Files
Hexo-Butterfly/themes/butterfly/layout/includes/third-party/math/mermaid.pug
T
2021-07-05 09:52:30 -07:00

16 lines
363 B
Plaintext

script.
if (document.getElementsByClassName('mermaid').length) {
if (window.mermaidJsLoad) mermaid.init()
else {
getScript('!{theme.CDN.mermaid}').then(() => {
window.mermaidJsLoad = true
mermaid.initialize({
theme: '!{theme.mermaid.theme}',
})
!{theme.pjax.enable} && mermaid.init()
})
}
}