-
Notifications
You must be signed in to change notification settings - Fork 658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow different mermaid theme on dark mode #1043
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for toha-ci ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
elements.forEach(element => { | ||
if (element.getAttribute('data-original-code') != null) { | ||
element.removeAttribute('data-processed'); | ||
element.innerHTML = element.getAttribute('data-original-code'); |
Check warning
Code scanning / CodeQL
DOM text reinterpreted as HTML Medium
DOM text
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank @BernatBC ! Look like mermaid is broken in the deployment preview. Can you please fix it?
Issue
Description
Before this PR, one could define a theme for mermaid. However, the defined theme was set for both light and dark theme.
This PR adds support for defining a custom theme for both light and dark site themes. There are 2 ways to define them:
config.yaml
/hugo.yaml
):Test Evidence
When defining a diagram using the
forest
theme for both light and dark theme (first diagram), and a diagram using the default theme (second diagram):Site on light theme:

Site on dark theme:
