Add custom header and footer partial support
This commit is contained in:
parent
b781218f4e
commit
d4c858a4f9
5 changed files with 5 additions and 0 deletions
|
@ -27,3 +27,6 @@ facebook = "example"
|
||||||
twitter = "tonyblyler"
|
twitter = "tonyblyler"
|
||||||
linkedin = "tblyler"
|
linkedin = "tblyler"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can also append your own `<head>` and footer elements (just before the `</body>`).
|
||||||
|
Do so by creating `layouts/partials/foot.html` and `layouts/partials/head.html` files in your hugo directory before compilation.
|
||||||
|
|
0
layouts/partials/foot.html
Normal file
0
layouts/partials/foot.html
Normal file
|
@ -8,5 +8,6 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<a href="#top">Top</a>
|
<a href="#top">Top</a>
|
||||||
</div>
|
</div>
|
||||||
|
{{ partial "foot.html" . }}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
0
layouts/partials/head.html
Normal file
0
layouts/partials/head.html
Normal file
|
@ -9,6 +9,7 @@
|
||||||
{{ if .RSSlink }}
|
{{ if .RSSlink }}
|
||||||
<link href="{{ .RSSlink }}" rel="alternative" type="application/rss+xml" title="{{ .Title }}" />
|
<link href="{{ .RSSlink }}" rel="alternative" type="application/rss+xml" title="{{ .Title }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ partial "head.html" . }}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<a id="title" href="/" title="{{ .Site.Title }}">
|
<a id="title" href="/" title="{{ .Site.Title }}">
|
||||||
|
|
Loading…
Reference in a new issue