This commit is contained in:
Charles-Philippe 2025-06-06 16:12:07 -04:00 committed by GitHub
commit 924eb58d1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,4 @@
<pre class="mermaid">
{{ .Inner | htmlEscape | safeHTML }}
</pre>
{{ .Page.Store.Set "hasMermaid" true }}

View File

@ -81,3 +81,9 @@
{{ define "toc" }}
{{ partial "docs/toc" . }}
{{ end }}
{{ if .Store.Get "hasMermaid" }}
<script src="{{ "mermaid.min.js" | relURL }}"></script>
<script type="module">
mermaid.initialize({ startOnLoad: true });
</script>
{{ end }}