Mermaid_extensionSourceMermaid diagram extension for odoc.
Renders {@mermaid[...]} code blocks as diagrams. By default uses client-side JavaScript, but can render server-side to PNG/SVG with format option (requires mermaid-cli/mmdc).
Example:
{@mermaid theme=forest[
graph LR
A[Start] --> B{Decision}
B -->|Yes| C[OK]
B -->|No| D[Cancel]Mermaid.js CDN URL
val get_theme :
[< `Binding of
string Odoc_parser.Loc.with_location
* string Odoc_parser.Loc.with_location
| `Tag of 'a ]
list ->
stringExtract option values
val get_format :
[< `Binding of
string Odoc_parser.Loc.with_location * 'a Odoc_parser.Loc.with_location
| `Tag of 'b ]
list ->
'a optionval get_filename :
[< `Binding of
string Odoc_parser.Loc.with_location * 'a Odoc_parser.Loc.with_location
| `Tag of 'b ]
list ->
'a optionval get_dimensions :
[< `Binding of
string Odoc_parser.Loc.with_location * 'a Odoc_parser.Loc.with_location &
string Odoc_parser.Loc.with_location
* 'b Odoc_parser.Loc.with_location
| `Tag of 'c & 'd ]
list ->
'b option * 'a optionBuild inline style string from dimensions
HTML-escape content for safe embedding
Puppeteer config for environments that need --no-sandbox
Run mmdc (mermaid-cli) to render to a specific format
CSS for mermaid diagrams
Extension documentation