Use .HasShortcode instead of setting the "includes_" variables in .Page.Store

This commit is contained in:
Eryn Wells 2022-10-31 07:49:31 -07:00
parent acb1cf3c35
commit fd4ab996c5
3 changed files with 4 additions and 6 deletions

View file

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

View file

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