erynwells.me/layouts/shortcodes/figures/railroad.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

4 lines
174 B
HTML

{{- $id := .Get "id" -}}
{{- .Page.Store.Set "includes_railroad_diagram" true -}}
<figure class="railroad-diagram" {{ if $id }}id="{{ $id }}"{{ end }}></figure>
{{ .Inner }}