Provide examples of content rendering before accessing Scratch or Store

Closes #2402
This commit is contained in:
Joe Mooring authored and Bjørn Erik Pedersen committed 2024-02-19 19:07:38 +01:00
1 parent 0206b9699b
commit a3184764d7
5 files changed
+56 -2

No files matched your search

+1 -1
View File
@@ -122,7 +122,7 @@ For example, to create a code block render hook to render [Mermaid] diagrams:
Then include this snippet at the bottom of the your base template:
{{< code file=layouts/_default/baseof.html copy=true >}}
{{ if .Page.Store.Get "hasMermaid" }}
{{ if .Store.Get "hasMermaid" }}
<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs';
mermaid.initialize({ startOnLoad: true });