Replies: 3 comments 2 replies
-
This definitely helped: Or just set the |
Beta Was this translation helpful? Give feedback.
0 replies
-
I have settled on the following script:
This however requires a reload to change the theme, i.e. it doesn't work with the theme toggle button. Any input on fixing that would be appreciated. |
Beta Was this translation helpful? Give feedback.
2 replies
-
try: {{ if or .Params.mermaid .Site.Params.mermaid }}
<!-- MermaidJS support -->
<script src="https://cdn.bootcdn.net/ajax/libs/mermaid/9.1.6/mermaid.min.js"></script>
<script>
mermaid.initialize({
startOnLoad: true,
theme: localStorage.getItem("pref-theme") === "dark" ? "dark" : "forest" // 自动匹配默认或夜间模式主题。
});
</script>
{{ end }} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm unable to change the mermaid theme configuration as on dark mode the default behavior is making it hard to see the diagrams.
Beta Was this translation helpful? Give feedback.
All reactions