docs(Diagrams): Update mermaid import mechanism (#1967)

This commit is contained in:
Sidharth Vinod 2023-03-17 20:59:24 +05:30 committed by GitHub
parent 4aceb68551
commit 1b11dcd5c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,8 +58,8 @@ And then include this snippet at the bottom of the content template (**Note**: b
```go-html-template ```go-html-template
{{ if .Page.Store.Get "hasMermaid" }} {{ if .Page.Store.Get "hasMermaid" }}
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script> <script type="module">
<script> import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs';
mermaid.initialize({ startOnLoad: true }); mermaid.initialize({ startOnLoad: true });
</script> </script>
{{ end }} {{ end }}