Markdown Features

dodeca processes markdown through marq, which extends standard markdown with several features.

Syntax highlighting

Fenced code blocks get syntax highlighting with light and dark themes:

markdown
```rust
fn main() {
    println!("hello");
}
```

Themes are configurable in dodeca.styx:

styx
syntax_highlight {
    light_theme github-light
    dark_theme tokyo-night
}

Highlighting is powered by arborium (tree-sitter grammars).

Mermaid diagrams

Fenced code blocks with the mermaid language tag are rendered as diagrams client-side:

markdown
```mermaid
graph LR
    A[Request] --> B{Cache?}
    B -->|Hit| C[Serve]
    B -->|Miss| D[Build]
    D --> E[(Store)]
    E --> C
```

Result:

graph LR
    A[Request] --> B{Cache?}
    B -->|Hit| C[Serve]
    B -->|Miss| D[Build]
    D --> E[(Store)]
    E --> C

The Mermaid.js library is automatically injected when any page uses mermaid blocks.

Pikchr diagrams

Pikchr diagrams are rendered server-side to SVG:

markdown
```pikchr
oval "Source" fit
arrow right 75%
box "Parse" fit
arrow right 75%
box "Transform" fit
arrow right 75%
box "Render" fit
arrow right 75%
file "Output" fit
```

Result:

SourceParseTransformRenderOutput

ASCII art diagrams

Code blocks tagged with aasvg are converted from ASCII art to SVG:

markdown
```aasvg
+----------+       +----------+       +----------+
|  Client  +------>|  Server  +------>| Database |
+----------+       +----+-----+       +----------+
                        |
                        v
                   +----+-----+
                   |  Cache   |
                   +----------+
```

Result:

Client Server Database Cache

Terminal recordings

Use ddc term to start a recorded terminal session. Exit with Ctrl+D, then paste your clipboard's contents straight into your markdown:

 dodeca › redocs 󰏗 1󰏫 1󰁝 1 › 22:35 🪴
ls -lhA | head -5
Permissions Size User Date Modified Name
drwxr-xr-x     - amos 21 Dec  2025  .cargo
drwxr-xr-x     - amos  5 Feb 11:04  .claude
drwxr-xr-x@    - amos 28 Dec  2025  .conductor
drwxr-xr-x     - amos 18 Jan 20:20  .config

 dodeca › redocs 󰏗 1󰏫 1󰁝 1 › 22:35 🪴

Table of contents

Headings in your markdown automatically generate a table of contents, accessible in templates as page.toc or section.toc.