TypeDoc Getting Started
For TypeScript projects, the theme ships as a TypeDoc plugin — @clean-jsdoc-theme/typedoc. It isn't a CSS theme extending TypeDoc's default; it registers a custom output that feeds TypeDoc's reflections through the same setu → dwar pipeline as the JSDoc bridge. The result is an identical site — SSR HTML, islands, fuzzy + full-text search, companion .md — generated from your TypeScript sources.
How it plugs in. The plugin's
load(app)declares one option block (cleanJsdocTheme, seeoptions.ts) and registers an output namedclean-jsdoc-themeviaapp.outputs.addOutput(...). The writer (write-site.ts) adapts reflections → doclets → the shared pipeline. So you select it two ways:pluginloads it,outputsturns it on.
Install and build
- 1Install
Install TypeDoc and the theme's TypeDoc plugin as dev dependencies:
CODEnpm install --save-dev typedoc @clean-jsdoc-theme/typedocCODEpnpm add -D typedoc @clean-jsdoc-theme/typedoc - 2Configure
Add a
typedoc.json. Load the plugin, select it as an output, and put theme options under thecleanJsdocThemekey (TypeDoc's counterpart to JSDoc'sopts):CODE{ entryPoints: ["src/index.ts"], tsconfig: "tsconfig.json", readme: "README.md", // Load the plugin, then select its output to render. plugin: ["@clean-jsdoc-theme/typedoc"], outputs: [{ name: "clean-jsdoc-theme", path: "dist" }], // Theme options live here. cleanJsdocTheme: { siteName: "My Library", }, } - 3Build
Run TypeDoc — it renders the registered output to
outputs[].path:CODEnpx typedoc - 4Serve
Open
dist/index.html, or serve the folder (Pagefind's full-text index needs HTTP to load):CODEnpx serve dist
A complete, runnable TypeDoc setup lives in the repo at
examples/typedoc-basic— itstypedoc.jsonis the reference for the setup above.
Where the options go
Every theme option is the same as for JSDoc — only the location differs: under cleanJsdocTheme instead of opts. The full list, with both forms side by side, is on the Configuration page. A few to start with:
| Option | What it does |
|---|---|
siteName | Header title — plain text, or a light/dark logo set with alt fallback text. |
fonts | Override heading / body (Google Fonts, loaded for you) and mono. |
colors / darkColors | Recolor the light / dark palettes — override just bg, accent, …, keep the rest. |
sectionOrder | Order the top-level sidebar sections. |
clubSidebarItems | Collapse related entries under a shared, collapsible parent. |
menu | Custom links pinned above the sidebar, each with a lucide: / simpleicons: icon. |
copyPage | The per-page "copy page" / "open in LLM" button (on by default). |
Because
cleanJsdocThemeis a dedicated namespace, unknown keys inside it only ever warn (with a "did you mean?" hint) — seestrictto escalate that to an error.
Multiple languages
The localization workflow declares its locales in the same cleanJsdocTheme block (locales + defaultLocale) and runs through the clean-jsdoc CLI — see Localize your docs and the locales / defaultLocale reference.
Today the TypeDoc bridge can extract translation catalogs but does not yet render the per-locale sites — localized builds are JSDoc-only for now. A single-language TypeDoc site is fully supported.
Next steps
- Build an API reference — what becomes a page and how the source-file viewer works.
- Build a guides site and Combine guides + API — add hand-written Markdown to the same site.
- Structure your sidebar — grouping and ordering levers.
- Authoring — callouts, steps, tabs, and embeds.
- Localize your docs — the multi-language workflow (extract works on TypeDoc; localized builds are JSDoc-only today).
- Packages — how the shared
setu → dwarpipeline (and the@clean-jsdoc-theme/typedocplugin) work under the hood.