Advanced authoring
Combine built-in math and diagrams with dynamic code, typed API tables, and image metadata.
Foldocs compiles these features at build time wherever possible. The static HTML remains readable before the Foldkit runtime starts.
Math and diagrams
Math is compiled to accessible KaTeX markup, while Mermaid diagrams retain a readable source fallback and load the browser renderer only on routes that contain diagrams.
Dynamic highlighted code
Use DynamicCodeBlock when generated content supplies a literal code string.
It goes through the same Shiki pipeline as a fenced code block.
const answer: number = 42Type tables
Type tables use deterministic nested components, so they can be indexed and serialized without executing JavaScript in MDX.
| Property | Type | Default | Description |
|---|---|---|---|
title | string | — | Displayed page title. |
draft | boolean | false | Excludes the page from production output. |
Image metadata and zoom
Relative images are inspected during compilation. Foldocs writes intrinsic
width and height attributes to prevent layout shift, then opens the image in
an accessible full-screen preview when selected.
Last updated 2 ago 2026