layouts/partials/scripts/other.html
@@ -1,7 +1,13 @@ {{ if in .Content "mermaid" }} <input type="checkbox" class="mermaid-theme"> <script type="module"> import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs'; mermaid.initialize({ startOnLoad: true, theme: 'dark' }); function initialize_mermaid(theme = 'base') { mermaid.initialize({ startOnLoad: true, theme: theme }); } initialize_mermaid(); </script> {{ end }}