Skip to content

Commit 6962efb

Browse files
committed
Detect default dark themes for mermaid diagrams
1 parent 4b31070 commit 6962efb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

book/mermaid-init.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
mermaid.initialize({startOnLoad:true});
1+
mermaid.initialize({
2+
startOnLoad: true,
3+
theme: ['coal', 'navy', 'ayu'].includes(theme) ? 'dark' : 'default',
4+
});

0 commit comments

Comments
 (0)