Add variable scoping to partial

See https://gohugo.io/templates/partials/#variable-scoping
This commit is contained in:
Enguerran Colson 2020-10-02 21:29:38 +02:00
parent 72d8201b70
commit 1f1642c6c3

View File

@ -43,7 +43,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 }}
{{ block "head" . }}{{ partial "head-additions.html" . }}{{ end }}
</head>
<body class="ma0 {{ $.Param "body_classes" | default "avenir bg-near-white"}}{{ with getenv "HUGO_ENV" }} {{ . }}{{ end }}">