Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

mdbook-pele

mdBook preprocessor that renders Mermaid diagrams with Pele.

Pele is a fast, small (~230 kB gzipped), zero-dependency Mermaid → SVG renderer that themes via CSS variables. It supports every diagram type in Mermaid 12.1.0 and is used by Obsidian.

Why Pele?

Compared to the classic mdbook-mermaid (client-side mermaid.js):

Pelemermaid.js
Bundle size (gzip)~230 kB~1.6 MB
Render time0.05–0.3 ms6–82 ms
Dependencies023
ThemingCSS variablestheme config
Responsive layoutadapts layoutscales

Quick example

flowchart TD
  A[Mermaid text] --> B{Flowchart?}
  B -- Yes --> C[Pele]
  B -- No --> D[Mermaid]
  C --> E([SVG])
  D --> E

What’s in this book

  • Getting Started — installing the preprocessor and setting it up in a book
  • Usage — writing diagrams, and what the preprocessor does to your Markdown
  • Theming — how diagrams follow mdBook themes, and how to customize them
  • Supported Diagram Types — every diagram type Pele can render
  • Troubleshooting — common problems and fixes