One of the most tragic things I know about human nature is that all of us tend to put off living. We are all dreaming of some magical rose garden over the horizon instead of enjoying the roses that are blooming outside our windows today.
Dale Carnegie
New Mermaid Test
Using Mermaid Markdown Syntax in Hugo
I am trying out the newest version of Mermaid, and also a new way to set it up within Hugo. Instead of the shortcode I setup from the previous article, I have created a code block render hook, as found in the Hugo documentation on the Hugo Website.
I have written a markdown code block of type Mermaid, to render the diagram found below…
Sequence Diagram
---
config:
theme: 'base'
themeVariables:
darkMode: true
background: '#f4f4f4'
primaryColor: '#ccc4dd'
primaryTextColor: '#aa2825'
---
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
Click the pencil icon next to the post to see the render