Browse Source

Remove caching from head-additions / document in readme.md

283-add-head-partial
mountainbug95 4 years ago
parent
commit
e22d23d057
No account linked to committer's email address
3 changed files with 6 additions and 1 deletions
  1. 5
    0
      README.md
  2. 1
    1
      layouts/_default/baseof.html
  3. 0
    0
      layouts/partials/head-additions.html

+ 5
- 0
README.md View File

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. 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 ### Nearly finished


In order to see your site in action, run Hugo's built-in local server. In order to see your site in action, run Hugo's built-in local server.

+ 1
- 1
layouts/_default/baseof.html View File

{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }} {{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
{{ template "_internal/google_analytics_async.html" . }} {{ template "_internal/google_analytics_async.html" . }}
{{ end }} {{ end }}
{{ block "head" . }}{{ partialCached "site-head.html" . }}{{ end }}
{{ block "head" . }}{{ partial "head-additions.html" }}{{ end }}
</head> </head>


<body class="ma0 {{ $.Param "body_classes" | default "avenir bg-near-white"}}{{ with getenv "HUGO_ENV" }} {{ . }}{{ end }}"> <body class="ma0 {{ $.Param "body_classes" | default "avenir bg-near-white"}}{{ with getenv "HUGO_ENV" }} {{ . }}{{ end }}">

layouts/partials/site-head.html → layouts/partials/head-additions.html View File


Loading…
Cancel
Save