docgen

A documentation site generator for developers who want a fast, readable site without pulling in a framework.

pnpm add @erikt/docgen
No build step

Runs TypeScript directly via Node.js ≥23.6. No tsc, no esbuild, no config.

File-based routing

Drop a .md or .ts file in pages/ and it becomes a route. No config required.

Static output

docgen build writes plain HTML files deployable to GitHub Pages or any static host.

Syntax highlighting

Code blocks are highlighted at build time via Shiki with accurate language grammars and light/dark themes.

Light & dark mode

Follows the system preference out of the box, with a toggle that persists across visits.

Search

Full-text search across all pages powered by MiniSearch — no server, no indexing pipeline.

Quick start

Install
pnpm add @erikt/docgen
Configure

Create docs.config.ts in your project root.

import { defineDocs } from "@erikt/docgen";

export default await defineDocs({
  structure: [{ label: "Guide", path: "/guide", icon: "book" }],
});
Run
pnpm docgen dev
# listening on http://localhost:5151