Diagrams
Write Mermaid diagrams in a mermaid code fence. Rendering uses the optional mermaid package — install it to enable diagrams:
bun add mermaid```mermaidflowchart LR Write --> Present --> Export```- Loaded on demand — only slides that contain a diagram fetch
mermaid; projects without it build normally. - Theme follows the deck:
dark/gradient→ Mermaiddark,forest→forest, everything else →default. - Sized for slides — labels are scaled to match the slide’s body text.
- Works in
.mdxand.mdslides, the presenter preview, and PDF export (exporters wait for diagrams to finish rendering). - Without
mermaidinstalled — or when a diagram has a syntax error — the source is shown as code and a message is logged to the browser console.