mirror of https://github.com/theNewDynamic/gohugo-theme-ananke.git

Tanner Smith
03.01.2020 9752a70c09165da572776c85dc2c1472870af671
Add head partial (#285)

* Add head-additions partial
1 files added
2 files modified
6 ■■■■■ changed files
README.md 5 ●●●●● patch | view | raw | blame | history
layouts/_default/baseof.html 1 ●●●● patch | view | raw | blame | history
layouts/partials/head-additions.html patch | view | raw | blame | history
README.md
@@ -141,6 +141,11 @@
If you add a key of `show_reading_time` true to either the Config Params, a page or section's front matter, articles will show the reading time and word count.
### Adding Scripts to the Page Head
Some scripts need to be added within the page head. To add your own scripts to the page head, simply insert them into the `head-additions.html` partial located in the `layouts/partials` folder.
### Nearly finished
In order to see your site in action, run Hugo's built-in local server.
layouts/_default/baseof.html
@@ -42,6 +42,7 @@
    {{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production")  }}
      {{ template "_internal/google_analytics_async.html" . }}
    {{ end }}
    {{ block "head" . }}{{ partial "head-additions.html" }}{{ end }}
  </head>
  <body class="ma0 {{ $.Param "body_classes"  | default "avenir bg-near-white"}}{{ with getenv "HUGO_ENV" }} {{ . }}{{ end }}">
layouts/partials/head-additions.html