mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2024-11-22 03:19:25 +00:00
Update MermaidJS example
This commit is contained in:
parent
e611f564bb
commit
6a1932611c
@ -1,6 +1,6 @@
|
||||
# Mermaid Chart
|
||||
|
||||
[Mermaid](https://mermaidjs.github.io/) is library for generating svg charts and diagrams from text.
|
||||
[MermaidJS](https://mermaid-js.github.io/) is library for generating svg charts and diagrams from text.
|
||||
|
||||
{{< hint info >}}
|
||||
**Override Mermaid Initialization Config**
|
||||
@ -14,33 +14,28 @@ create a `mermaid.json` file in your `assets` folder!
|
||||
{{< columns >}}
|
||||
```tpl
|
||||
{{</* mermaid [class="text-center"]*/>}}
|
||||
sequenceDiagram
|
||||
Alice->>Bob: Hello Bob, how are you?
|
||||
alt is sick
|
||||
Bob->>Alice: Not so good :(
|
||||
else is well
|
||||
Bob->>Alice: Feeling fresh like a daisy
|
||||
end
|
||||
opt Extra response
|
||||
Bob->>Alice: Thanks for asking
|
||||
end
|
||||
stateDiagram-v2
|
||||
State1: The state with a note
|
||||
note right of State1
|
||||
Important information! You can write
|
||||
notes.
|
||||
end note
|
||||
State1 --> State2
|
||||
note left of State2 : This is the note to the left.
|
||||
{{</* /mermaid */>}}
|
||||
```
|
||||
|
||||
<--->
|
||||
|
||||
{{< mermaid >}}
|
||||
sequenceDiagram
|
||||
Alice->>Bob: Hello Bob, how are you?
|
||||
alt is sick
|
||||
Bob->>Alice: Not so good :(
|
||||
else is well
|
||||
Bob->>Alice: Feeling fresh like a daisy
|
||||
end
|
||||
opt Extra response
|
||||
Bob->>Alice: Thanks for asking
|
||||
end
|
||||
stateDiagram-v2
|
||||
State1: The state with a note
|
||||
note right of State1
|
||||
Important information! You can write
|
||||
notes.
|
||||
end note
|
||||
State1 --> State2
|
||||
note left of State2 : This is the note to the left.
|
||||
{{< /mermaid >}}
|
||||
|
||||
{{< /columns >}}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user