erynwells.me/layouts/shortcodes/figures/p5.html
Eryn Wells e2b454d7df 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.
2022-11-15 17:45:44 -08:00

5 lines
200 B
HTML

{{ $id := .Get "id" }}
{{ .Page.Store.Set "includes_p5_sketch" true }}
<div class="centered">
<figure class="p5-sketch {{ with .Get "bordered" }}bordered{{ end }}" id="{{ $id }}"></figure>
</div>