发现mermaid
功能没有打开,先进入blog的根目录执行命令
1
| npm install hexo-filter-mermaid-diagrams --save
|
然后编辑next
主题文件夹下的_config.yml
文件
1
| vim $blog/theme/next/_config.yml
|
把mermaid
的enable
开关置为true
1 2 3 4 5
| mermaid: enable: true theme: forest
|
好了,大功告成,现在可以来画图了
1 2 3 4
| graph TD; A-->B; A-->C; B-->D;
|
graph TD;
A-->B;
A-->C;
B-->D;
1 2 3
| sequenceDiagram Alice->>John: Hello John, how are you? John-->>Alice: Great!
|
sequenceDiagram
Alice->>John: Hello John, how are you?
John-->>Alice: Great!
1 2 3 4 5 6
| pie title Key elements in Product X "Calcium" : 42.96 "Potassium" : 50.05 "Magnesium" : 10.01 "Iron" : 5
|
pie
title Key elements in Product X
"Calcium" : 42.96
"Potassium" : 50.05
"Magnesium" : 10.01
"Iron" : 5
参考资料
使用 Typora 画图(类图、流程图、时序图)
hexo next渲染markdown mermaid流程图