npm install --save hexo-filter-mermaid-diagrams
npm install --save hexo-filter-flowchart
经过多轮努力都失败的情况下被迫在footer.ejs中添加<script src="https://cdn.bootcss.com/mermaid/8.0.0-rc.8/mermaid.min.js"></script>
(该js文件后来保存在本地路径,改为/js/mermaid.min.js了)
graph LR
classDef className fill:white,stroke:#333,stroke-width:1px;
id2[寄存器A]-->id3[寄存器B]
subgraph one step
id[内存]-->id1[缓存]
id1[缓存]-->id2[寄存器A]
end
subgraph two step
id3[寄存器B]-->id4[缓存]
id4[缓存]-->id5[内存]
end
class id1,id2 className;
st=>start: 开始
e=>end: 结束
op=>operation: 我的操作
cond=>condition: 判断确认?
st->op->cond
cond(yes)->e
cond(no)->op