Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion content/components/mermaid.md
Original file line number Diff line number Diff line change
Expand Up @@ -538,4 +538,23 @@ The `mermaid` shortcode supports dark mode and allows creation of a custom Merma

## Arguments

The shortcode does not support any arguments. Instead, use [Mermaid syntax](https://mermaid.js.org/intro/) to define your diagram or chart.
The shortcode supports the following optional arguments:

{{< args structure="mermaid" group="shortcode" >}}

For example, overlay pan-and-zoom controls and add a full-screen button — which opens the diagram in a lightbox overlay — handy for large, dense diagrams:

<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}

{{</* mermaid controls=true fullscreen=true */>}}
flowchart LR
A[Start] --> B{Decision}
B -->|Yes| C[Action]
B -->|No| D[End]
{{</* /mermaid */>}}

{{< /example >}}
<!-- markdownlint-enable MD037 -->

The diagram content itself uses standard [Mermaid syntax](https://mermaid.js.org/intro/).
Loading