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

14 lines
339 B
Plaintext

<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>