Add empty partials for custom html in head and footer

As per https://gohugo.io/templates/partials/ "Theme developers may want
to include a few partials with empty HTML files in the theme just so end
users have an easy place to inject their customized content."

Resolves #42
This commit is contained in:
Li-Wen Yip 2017-04-02 23:50:42 +01:00
parent 0cfbe987c4
commit 2223163a4f
6 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,7 @@
<!--
If you want to include any custom html just before </body>, put it in this file.
Or you can delete these file if you don't need it.
-->
<!-- for example, you could include some js libraries:
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.19.1/vis.js" integrity="sha256-HdIuWBZj4eftihsoDCJoMYjZi6aNVaw7YlUpzKT3ZxI=" crossorigin="anonymous"></script>
-->

View File

@ -0,0 +1,18 @@
<!--
If you want to include any custom html just before </head>, put it in this file.
Or you can delete these file if you don't need it.
-->
<!-- for example, you could insert this custom css, which makes the bigimg not stretch:
<style>
.intro-header.big-img, .intro-header.big-img .big-img-transition {
-webkit-background-size: contain !important;
-moz-background-size: contain !important;
background-size: contain !important;
-o-background-size: contain !important;
background-color: lightgrey;
}
</style>
-->
<!-- or you could include some additional css libraries:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.19.1/vis.css" integrity="sha256-I1UoFd33KHIydu88R9owFaQWzwkiZV4hXXug5aYaM28=" crossorigin="anonymous" />
-->

View File

@ -76,3 +76,4 @@
{{ end }}
{{ template "_internal/google_analytics.html" . }}
{{- partial "footer_custom.html" . }}

View File

@ -0,0 +1,4 @@
<!--
If you want to include any custom html just before </body>, put it in /layouts/footer_custom.html
Do not put anything in this file - it's only here so that hugo won't throw an error if /layouts/footer_custom.html doesn't exist.
-->

View File

@ -46,4 +46,5 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/pygment_highlights.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/highlight.min.css" />
{{- partial "head_custom.html" . }}
</head>

View File

@ -0,0 +1,4 @@
<!--
If you want to include any custom html just before </head>, put it in /layouts/head_custom.html
Do not put anything in this file - it's only here so that hugo won't throw an error if /layouts/head_custom.html doesn't exist.
-->