Info
🌱 來自: markdown-lab
mermaid 怎麼用
Use mermaid with code fences - tips & tricks - HUGO
When using code fences syntax for mermaid code blocks, you’ll notice that Hugo turns this into …
. Turns out it’s possible to tell mermaid which classes to look for when searching for graph definitions.
flowchart LR
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
Simply add this at the end of your body:
{{ $mermaid := resources.Get "/path/to/mermaid.min.js" }}
<script src="{{ $mermaid.RelPermalink }}"></script>
<script>
window.onload = function() {
mermaid.init(undefined, ".language-mermaid");
};
</script>
- Adding Diagrams to Your Hugo Blog With Mermaid | Navendu Pottekkat
- 使用Mermaid在hugo的Markdown中繪製UML · 零壹軒·筆記
- Hugo部落格新增mermaid作圖 - 騰訊雲開發者社區-騰訊雲 給 Hugo 部落格新增 mermaid 短程式碼支援 :: /dev/ttyS3 — 回首向來蕭瑟處 也無荒野也無燈
- Add mermaid support to hugo code fences | anis
- Hugo code fences output two tags, pre and code - Stack Overflow