Feat: add Mermaid config

This commit is contained in:
Cell
2022-07-10 14:51:34 +08:00
parent e47abfde71
commit 01b1d40d6c
11 changed files with 33 additions and 7 deletions
@@ -13,7 +13,6 @@ tags: ["shortcodes"]
categories: ["documentation"]
hiddenFromHomePage: true
repost: https://hugoloveit.com/theme-documentation-mermaid-shortcode/
---
{{< version 0.2.15 changed >}}
@@ -26,6 +25,10 @@ The `mermaid` shortcode supports diagrams in Hugo with [Mermaid](https://mermaid
Just insert your mermaid code in the `mermaid` shortcode and thats it.
{{< admonition tip >}}
You can configure mermaid themes globally in `config.toml` via the `params.mermaid` parameter
{{< /admonition >}}
## Flowchart {#flowchart}
Example **flowchart** `mermaid` input:
@@ -13,7 +13,6 @@ tags: ["shortcodes"]
categories: ["documentation"]
hiddenFromHomePage: true
repost: https://hugoloveit.com/zh-cn/theme-documentation-mermaid-shortcode/
---
{{< version 0.2.15 changed >}}
@@ -26,6 +25,10 @@ repost: https://hugoloveit.com/zh-cn/theme-documentation-mermaid-shortcode/
只需将你的 mermaid 代码插入 `mermaid` shortcode 中即可.
{{< admonition tip >}}
你可以在 `config.toml` 中通过 `params.mermaid` 参数全局配置 mermaid 的主题
{{< /admonition >}}
## 流程图 {#flowchart}
一个 **流程图** `mermaid` 示例: