2025-2-26-fixed
This commit is contained in:
13
themes/fluid/layout/_partials/plugins/mermaid.ejs
Normal file
13
themes/fluid/layout/_partials/plugins/mermaid.ejs
Normal file
@ -0,0 +1,13 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user