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
6eaa667a7f
commit
e2b454d7df
3 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
{{ $id := .Get "id" }}
|
||||
{{ .Page.Scratch.Set "includes_p5_sketch" true }}
|
||||
{{ .Page.Store.Set "includes_p5_sketch" true }}
|
||||
<div class="centered">
|
||||
<figure class="p5-sketch {{ with .Get "bordered" }}bordered{{ end }}" id="{{ $id }}"></figure>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue