在博客园markdown中使用mermaid
2022/2/7 23:52:04
本文主要是介绍在博客园markdown中使用mermaid,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
博客后台 -> 设置 -> 页首HTML代码.
添加以下代码:
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script> <script>mermaid.initialize({startOnLoad:true});</script>
之后就可以愉快的使用mermaid画图了.
例如:
<div class="mermaid"> gantt title Gantt Demo dateFormat YYYY-MM-DD section A Start: d1, 2014-01-01, 21d section B Up: d2, after d1, 31d section C Down: d3, after d2, 11d section D Complete: d4, after d3, 16d </div>
结果如下
gantt title Gantt Demo dateFormat YYYY-MM-DD section A Start: d1, 2014-01-01, 21d section B Up: d2, after d1, 31d section C Down: d3, after d2, 11d section D Complete: d4, after d3, 16d备注: 在写作过程中博客园实时预览md不会渲染mermaid, 博文发布以后页面会正常显示.
这篇关于在博客园markdown中使用mermaid的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-05-08Sora从入门到入门-白话版1
- 2024-05-082024年github开源top100中文
- 2024-05-083、最大池化maxinmum pooling
- 2024-05-08动态规划基础思想
- 2024-05-08Kimi:文本解析利器,你相信光么?
- 2024-05-08在Windows电脑上快速运行AI大语言模型-Llama3
- 2024-05-08MoneyPrinterTurbo:一键生成短视频的AI神器
- 2024-05-08阶跃星辰:探索智能科技的星辰大海
- 2024-05-08一分钟部署 Llama3 中文大模型,没别的,就是快
- 2024-03-28smol ai