ahonn / hexo-theme-even

:rocket: A super concise theme for Hexo
https://ahonn.github.io/hexo-theme-even/
MIT License
1.36k stars 212 forks source link

是否有 mermaid 支持? #299

Open lucmann opened 1 week ago

lucmann commented 1 week ago

描述

不知道是网络原因,还是其它问题,mermaid diagram 有时渲染得出来,有时却出不来(同一个 diagram)

image

主题配置

mermaid:
  version: "11.2.1"
  enable: true
  theme: forest
  options:
    startOnload: true

mermaid.swig

{%- if theme.mermaid.enable -%}
  <script src='https://unpkg.com/mermaid@{{ theme.mermaid.version }}/dist/mermaid.min.js'></script>
  <script>
    if (window.mermaid) {
      mermaid.initialize({{ JSON.stringify(theme.mermaid.options) }});    
    }
  </script>
{%- endif -%}
lucmann commented 5 days ago

mermaid diagrams 时好时坏的原因是我安装的另一个 hexo 插件 hexo-filter-kroki 渲染的结果, 将其移除后,mermaid 完全渲染不了, 100% 纯文本了。这似乎说明目前的 hexo-theme-even 没有支持 mermaid, 但是我又看到 #166, 所以不确定到底支持不支持 mermaid.