hexo/node_modules/hexo-theme-fluid/layout/_partials/plugins/mermaid.ejs

14 lines
416 B
Plaintext
Raw Normal View History

2023-10-03 11:14:36 +08:00
<script>
Fluid.utils.createScript('<%= url_join(theme.static_prefix.mermaid, 'mermaid.min.js') %>', function() {
mermaid.initialize(<%- JSON.stringify(theme.post.mermaid.options || {}) %>);
Fluid.utils.listenDOMLoaded(function() {
Fluid.events.registerRefreshCallback(function() {
if ('mermaid' in window) {
mermaid.init();
}
});
});
});
</script>