Skip to content

Commit

Permalink
Mermaid: switch to ESM import
Browse files Browse the repository at this point in the history
  • Loading branch information
djibe authored and bep committed Feb 27, 2023
1 parent 43d83c1 commit b2a23b6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions layouts/partials/hooks/before-body-end.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{ if .Page.Store.Get "hasMermaid" }}
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
<script>
<script type="module" async>
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@9/+esm';

mermaid.initialize({ startOnLoad: true });
</script>
{{ end }}

0 comments on commit b2a23b6

Please sign in to comment.