mirror of https://github.com/jpanther/congo.git
♻️ Use .HasShortcode for mermaid script
parent
f0c6306e6c
commit
46a7031a3a
|
@ -35,7 +35,7 @@
|
|||
</footer>
|
||||
|
||||
{{/* Include mermaid.js only on pages that use the shortcode */}}
|
||||
{{- if (in (string .Content) "class=\"mermaid\"") -}}
|
||||
{{- if .Page.HasShortcode "mermaid" -}}
|
||||
<script src="https://unpkg.com/mermaid@8.11.4/dist/mermaid.min.js"></script>
|
||||
<script>
|
||||
mermaid.initialize({ theme: "default" });
|
||||
|
|
Loading…
Reference in New Issue