hexo/themes/blank/layout/partial/_maths/mermaid.ejs

14 lines
339 B
Plaintext
Raw Normal View History

2024-05-09 10:56:56 +08:00
<script>
if (document.getElementsByClassName('mermaid').length) {
if (window.mermaidJsLoad) mermaid.init()
else {
$.getScript("<%= theme.mermaid.script %>", function () {
window.mermaidJsLoad = true
mermaid.initialize({
theme: "<%= theme.mermaid.theme %>",
})
})
}
}
</script>