hexo渲染mermaid
hexo 渲染 mermaid(水一篇)
我用的是 butterfly 主题
1. 安装插件
1 | npm install --save hexo-filter-mermaid-diagrams |
2. 配置
在主题目录下的themes/butterfly/_config.yml中添加以下配置:
1 | mermaid: |
在themes/butterfly/layout/includes/footer.pug末尾添加以下配置:
1 | if theme.mermaid && theme.mermaid.enable |
3. 在文章中使用
1 | <pre class="mermaid">graph TD |
4. 重新生成即可
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.