Skip to content

[fix] 修复mermaid暗色配置项的一个小问题#567

Merged
xaoxuu merged 1 commit intoxaoxuu:mainfrom
HisMax:main
Apr 26, 2025
Merged

[fix] 修复mermaid暗色配置项的一个小问题#567
xaoxuu merged 1 commit intoxaoxuu:mainfrom
HisMax:main

Conversation

@HisMax
Copy link
Contributor

@HisMax HisMax commented Apr 21, 2025

在暗色模式下,Mermaid 图表未能自动切换为 dark 主题,仍然使用浅色,导致显示异常。

经查是模板中 EJS (themes/stellar/layout/_plugins/mermaid.ejs) 判断用的是:

"<%- theme.style.darkmode %>" == "auto" && ...

但实际配置项是:

style:
  prefers_theme: auto

修改为了:

"<%- theme.style.prefers_theme %>" == "auto" && ...

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@xaoxuu xaoxuu merged commit aa4afd3 into xaoxuu:main Apr 26, 2025
cg0726 pushed a commit to cg0726/hexo-theme-stellar that referenced this pull request Jul 3, 2025
…iguration. (xaoxuu#567)

Co-authored-by: histonemax <histonemax@noreply.gitcode.com>
lliei0x pushed a commit to lliei0x-x/hexo-theme-stellar that referenced this pull request Aug 14, 2025
…iguration. (xaoxuu#567)

Co-authored-by: histonemax <histonemax@noreply.gitcode.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants