Quartz supports Mermaid for diagrams and charts in your notes (flow charts, sequence diagrams, timelines, and so on). This is part of Obsidian compatibility and can be turned on or off on that plugin.

Diagrams are drawn with Pele, as in Obsidian 1.15 (since ObsidianFlavoredMarkdown 2.4 / Quartz 5.3), inside a <div class="mermaid">. Set diagramRenderer: mermaid on ObsidianFlavoredMarkdown to use the deprecated Mermaid.js instead.

Note

In the default config ObsidianFlavoredMarkdown (order: 40) runs after SyntaxHighlighting (order: 20). If Mermaid diagrams don’t show up and you changed either order, restore that sequence.

quartz.config.yaml
plugins:
  - source: "@quartz-community/obsidian-flavored-markdown"
    options:
      mermaid: true
      diagramRenderer: pele # or mermaid (deprecated)

Both renderers only load on pages that contain a Mermaid diagram. Pele is served from your own site (Quartz 5.1+) and only downloads the code for the diagram types on the page; on older Quartz versions it is loaded from jsDelivr. Mermaid.js is always loaded from a CDN.

Syntax

To add a Mermaid diagram, create a mermaid code block.

```mermaid
sequenceDiagram
    Alice->>+John: Hello John, how are you?
    Alice->>+John: John, can you hear me?
    John-->>-Alice: Hi Alice, I can hear you!
    John-->>-Alice: I feel great!
```
sequenceDiagram Alice->>+John: Hello John, how are you? Alice->>+John: John, can you hear me? John-->>-Alice: Hi Alice, I can hear you! John-->>-Alice: I feel great!