Markdown Features
Created May 28, 2026Updated Jun 11, 2026Takeshi Takatsudo
Built-in and opt-in markdown pipeline features provided by zfb.
zfb's markdown pipeline provides a set of Core features that are always active, plus a set of Opt-in features that you enable individually in zfb.config.ts under markdown.features.
Core features
These 8 features are always active — no configuration required.
| Feature | Description |
|---|---|
| CJK Friendly | Improves spacing and line-breaking for CJK (Chinese, Japanese, Korean) prose. |
| Heading Links | Adds anchor links to h2+ headings for direct deep-linking. |
| Code Title | Renders a filename/title bar above fenced code blocks when title="…" is set. |
| External Links | Marks outbound links with a visual indicator automatically. |
| Resolve Links | Resolves relative .mdx/.md links to clean doc URLs. |
| Strip .md Extension | Strips .md/.mdx from internal link hrefs in the final output. |
| Syntax Highlighting | Build-time code highlighting via syntect (fixed base16-ocean-dark theme). |
| Directives Registry | The generic :::name directive engine — maps directive syntax to JSX components. The admonition vocabulary is registered separately as a recipe. |
Opt-in features
These 14 features are disabled by default. Enable each one with the corresponding markdown.features.* key in zfb.config.ts.
| Feature | Config key | Description |
|---|---|---|
| Admonitions Preset | directives | Registers the admonition vocabulary (note/tip/warning/danger/info/caution/details) via the directives map. |
| Mermaid | mermaid | Renders ```mermaid fences as diagrams via the client-side Mermaid library. |
| Image Enlarge | settings.imageEnlarge | Wraps images in a <figure> that expands them on click. Userland setting — the built-in markdown.features key was removed at next.18. |
| Heading Marker TOC | headingMarkerToc | Attaches per-heading anchor markers and feeds the TOC island. |
| GitHub Alerts | githubAlerts | Converts > [!NOTE]/[!TIP]/[!WARNING]/[!IMPORTANT]/[!CAUTION] blockquotes to admonition markup. |
| Reading Time | readingTime | Computes estimated reading time and exposes it as page-level metadata. |
| GitHub Autolinks | githubAutolinks | Auto-links issue numbers, cross-repo references, and commit SHAs to GitHub. |
| Code Enrichment | codeEnrichment | Adds a title bar, copy button, and diff/line-highlight decorations to code blocks. |
| Code Tabs | codeTabs | Renders :::code-group directives as tabbed code panels via <CodeGroup>. |
| Ruby | ruby | Adds ruby annotation support ({base}^{ruby} syntax). |
| TOC Export | tocExport | Exports the page table-of-contents as an export const toc named export. |
| Image Dimensions | imageDimensions | Injects width/height attributes on images from disk metadata at build time. |
| Link Validation | linkValidation | Validates internal links at build time and warns (or errors) on broken references. |
| Transclude | transclude | Embeds the content of another file via :::include{file="…"} or ![[path]]. Disabled in zudo-doc (transclude renderer not yet wired). |
Revision History
Takeshi TakatsudoCreated: 2026-05-29T01:18:48+09:00Updated: 2026-06-11T17:55:32+09:00