- Go to Blogger dashboard > Theme > Edit HTML.
- Add these lines before </head>. Note: Please go to https://mermaid.js.org/config/usage.html to check the latest usage.
- Finally, the example mermaid.js code and diagram will be like below:
<script src='https://cdn.jsdelivr.net/npm/mermaid@11.6.0/dist/mermaid.min.js'/>
<script>
mermaid.initialize({startOnLoad: true, theme: 'dark'});
</script>
<div class="mermaid">
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
</div>
graph TD; A-->B; A-->C; B-->D; C-->D;
No comments:
Post a Comment