Use .Page.Store instead of .Page.Scratch for conditional includes of support JS
I saw this on one of the Hugo documentation pages, so I copied it. I am not sure what the difference is.
This commit is contained in:
parent
5920625753
commit
acb1cf3c35
3 changed files with 4 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
{{- $id := .Get "id" -}}
|
||||
{{- .Page.Scratch.Set "includes_railroad_diagram" true -}}
|
||||
{{- .Page.Store.Set "includes_railroad_diagram" true -}}
|
||||
<figure class="railroad-diagram" {{ if $id }}id="{{ $id }}"{{ end }}></figure>
|
||||
{{ .Inner }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue