Loading assets/js/mermaid.js +3 −5 Original line number Diff line number Diff line Loading @@ -3,8 +3,6 @@ var config = { fontFamily: '"Jost", -apple-system, blinkmacsystemfont, "Segoe UI", roboto, "Helvetica Neue", arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";', }; /* eslint-disable no-undef */ document.addEventListener('DOMContentLoaded', () => { mermaid.initialize(config); /* eslint-enable no-undef */ }); config/_default/config.toml +0 −3 Original line number Diff line number Diff line Loading @@ -92,6 +92,3 @@ rel = "sitemap" [[module.mounts]] source = "node_modules/mermaid" target = "assets/js/vendor/mermaid" [[module.mounts]] source = "node_modules/mermaid" target = "static/js/vendor/mermaid" content/docs/prologue/quick-start.md +25 −8 Original line number Diff line number Diff line Loading @@ -15,6 +15,16 @@ toc: true ## Flow ```md {{</* mermaid class="bg-light text-center" */>}} graph TD A[Hard] -->|Text| B(Round) B --> C{Decision} C -->|One| D[Result 1] C -->|Two| E[Result 2] {{</* /mermaid */>}} ``` {{< mermaid class="bg-light text-center">}} graph TD A[Hard] -->|Text| B(Round) Loading Loading @@ -54,14 +64,21 @@ gantt {{< mermaid >}} classDiagram classA --|> classB : Inheritance classC --* classD : Composition classE --o classF : Aggregation classG --> classH : Association classI -- classJ : Link(Solid) classK ..> classL : Dependency classM ..|> classN : Realization classO .. classP : Link(Dashed) Class01 <|-- AveryLongClass : Cool <<interface>> Class01 Class09 --> C2 : Where am i? Class09 --* C3 Class09 --|> Class07 Class07 : equals() Class07 : Object[] elementData Class01 : size() Class01 : int chimp Class01 : int gorilla class Class10 { <<service>> int id size() } {{< /mermaid >}} ## State Loading layouts/shortcodes/mermaid.html +8 −3 Original line number Diff line number Diff line {{ if .Site.Params.options.mermaid -}} <div class="mermaid{{ with .Get "class" }} {{ . }}{{ end }}"> {{- .Inner -}} {{ $data := replaceRE "(^\\s+```)" "" .Inner -}} {{ replaceRE "(```\\s+$)" "" $data -}} </div> {{ else }} {{ errorf "Set `mermaid = true` in `./config/_default/params.toml`"}} {{ end }} No newline at end of file Loading
assets/js/mermaid.js +3 −5 Original line number Diff line number Diff line Loading @@ -3,8 +3,6 @@ var config = { fontFamily: '"Jost", -apple-system, blinkmacsystemfont, "Segoe UI", roboto, "Helvetica Neue", arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";', }; /* eslint-disable no-undef */ document.addEventListener('DOMContentLoaded', () => { mermaid.initialize(config); /* eslint-enable no-undef */ });
config/_default/config.toml +0 −3 Original line number Diff line number Diff line Loading @@ -92,6 +92,3 @@ rel = "sitemap" [[module.mounts]] source = "node_modules/mermaid" target = "assets/js/vendor/mermaid" [[module.mounts]] source = "node_modules/mermaid" target = "static/js/vendor/mermaid"
content/docs/prologue/quick-start.md +25 −8 Original line number Diff line number Diff line Loading @@ -15,6 +15,16 @@ toc: true ## Flow ```md {{</* mermaid class="bg-light text-center" */>}} graph TD A[Hard] -->|Text| B(Round) B --> C{Decision} C -->|One| D[Result 1] C -->|Two| E[Result 2] {{</* /mermaid */>}} ``` {{< mermaid class="bg-light text-center">}} graph TD A[Hard] -->|Text| B(Round) Loading Loading @@ -54,14 +64,21 @@ gantt {{< mermaid >}} classDiagram classA --|> classB : Inheritance classC --* classD : Composition classE --o classF : Aggregation classG --> classH : Association classI -- classJ : Link(Solid) classK ..> classL : Dependency classM ..|> classN : Realization classO .. classP : Link(Dashed) Class01 <|-- AveryLongClass : Cool <<interface>> Class01 Class09 --> C2 : Where am i? Class09 --* C3 Class09 --|> Class07 Class07 : equals() Class07 : Object[] elementData Class01 : size() Class01 : int chimp Class01 : int gorilla class Class10 { <<service>> int id size() } {{< /mermaid >}} ## State Loading
layouts/shortcodes/mermaid.html +8 −3 Original line number Diff line number Diff line {{ if .Site.Params.options.mermaid -}} <div class="mermaid{{ with .Get "class" }} {{ . }}{{ end }}"> {{- .Inner -}} {{ $data := replaceRE "(^\\s+```)" "" .Inner -}} {{ replaceRE "(```\\s+$)" "" $data -}} </div> {{ else }} {{ errorf "Set `mermaid = true` in `./config/_default/params.toml`"}} {{ end }} No newline at end of file