erynwells.me/layouts/shortcodes/figures/railroad.html
Eryn Wells acb1cf3c35 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-10-30 11:39:33 -07: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 }}