_includes/mermaid.html in jekyll-theme-chirpy-5.0.2 vs _includes/mermaid.html in jekyll-theme-chirpy-5.1.0
- old
+ new
@@ -1,10 +1,10 @@
<!--
mermaid-js loader
-->
-<script src="https://cdn.jsdelivr.net/npm/mermaid@8/dist/mermaid.min.js"></script>
+<script src="{{ site.data.assets[origin].mermaid.js }}"></script>
<script>
$(function() {
function updateMermaid(event) {
if (event.source === window && event.data &&
@@ -31,11 +31,11 @@
}
}
let initTheme = "default";
- if ($("html[mode=dark]").length > 0
- || ($("html[mode]").length == 0
+ if ($("html[data-mode=dark]").length > 0
+ || ($("html[data-mode]").length == 0
&& window.matchMedia("(prefers-color-scheme: dark)").matches ) ) {
initTheme = "dark";
}
let mermaidConf = {