Skip to content

Commit

Permalink
added different themes to diagrams post
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-house committed Jan 20, 2024
1 parent e7f194a commit 3223cc2
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions content/posts/adding-mermaid-diagrams.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,26 @@ draft = true
## Mermaid
Using [this help post](https://discourse.gohugo.io/t/correct-way-to-embed-mermaid-js/43491/11) I'll try and add mermaid diagrams to this blog.

Themes can also be set for the diagrams by adding in `%%{init: {'theme':'[theme.name]'}}%%` to the code block

```mermaid
%%{init: {'theme':'forest'}}%%
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!
```
```mermaid
%%{init: {'theme':'dark'}}%%
sequenceDiagram
participant Alice
participant Bob
Expand All @@ -21,6 +40,8 @@ sequenceDiagram
Bob-->>John: Jolly good!
```



## GoAT diagrams
[GoAT](https://github.com/bep/goat) diagrams are supported natively, which is great!

Expand Down

0 comments on commit 3223cc2

Please sign in to comment.