除了代码之外,我在 Markdown 文档中使用 mermaid 进行基本图表渲染。我发现这个在线编辑器 https://mermaidjs.github.io/mermaid-live-editor/在预览时对其进行编辑很有用。这建议更改主题(default and forest works).
当我将其复制粘贴到我的 Markdown 文档中时,如何设置主题?
可以使用以下命令更改 Markdown 文档中的主题指示 https://mermaid-js.github.io/mermaid/#/directives?id=directives-1对于每个数字。
这是一个示例(使用 Material for Mkdocs 进行测试):
This graph uses the forest theme:
``` mermaid
%%{init: {'theme': 'forest', "flowchart" : { "curve" : "basis" } } }%%
graph LR
A[Foo] --> B[Bar]
B --> A
```
That one uses the neutral theme:
``` mermaid
%%{init: {'theme': 'neutral' } }%%
graph LR
A[Foo] --> B[Bar]
B --> C[Baz]
```
结果将是:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)