DocDude generates a static documentation website from a directory of markdown files. For example the chart.xkcd documentation is generated with:
npx docdude --in docs --out docs-dist --title Chart.xkcd --subtitle 'xkcd styled chart lib'title(required) - Page title in sidebar and contentslug(optional) - URL slug (auto-generated from title if omitted)skip(optional) - Set totrueto exclude from output
Note Callouts:
Note: This text will be highlighted as an important note.Code Blocks:
function hello() {
console.log('Hello!');
}import { compile } from './src/compile.js';
await compile({
src: './docs',
dst: './build',
title: 'My Project',
subtitle: 'Documentation',
theme: 'apex',
segment: '',
google: ''
});docdude/
├── bin/static-docs.js # CLI entry point
├── src/
│ ├── compile.js # Core compilation logic
│ ├── markdown.js # Markdown → HTML
│ ├── html.js # HTML post-processing
│ ├── highlight.js # Syntax highlighting
│ ├── inject.js # Analytics injection
│ └── theme/apex/ # Default theme
├── package.json
└── README.md
- Markdown: marked
- Frontmatter: gray-matter
- Templating: handlebars
- DOM: cheerio
- Highlighting: highlight.js
- CLI: commander
Docdude was initially a Node.js rewrite of apex/static. Static was created by TJ in January 2018, and I used it to generate the docs site for chart.xkcd back then. When I tried to update the docs in 2026, I found that this tool was no longer usable. So I rewrote it with the help of Claude Code and started adding new features, such as mobile compatibility.
MIT