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, see options.ts) and registers an output named clean-jsdoc-theme via app.outputs.addOutput(...). The writer (write-site.ts) adapts reflections → doclets → the shared pipeline. So you select it two ways: plugin loads it, outputs turns it on.

Install and build

  1. 1
    Install

    Install TypeDoc and the theme's TypeDoc plugin as dev dependencies:

    CODE
    npm install --save-dev typedoc @clean-jsdoc-theme/typedoc
  2. 2
    Configure

    Add a typedoc.json. Load the plugin, select it as an output, and put theme options under the cleanJsdocTheme key (TypeDoc's counterpart to JSDoc's opts):

    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",
      },
    }
  3. 3
    Build

    Run TypeDoc — it renders the registered output to outputs[].path:

    CODE
    npx typedoc
  4. 4
    Serve

    Open dist/index.html, or serve the folder (Pagefind's full-text index needs HTTP to load):

    CODE
    npx serve dist

A complete, runnable TypeDoc setup lives in the repo at examples/typedoc-basic — its typedoc.json is 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:

OptionWhat it does
siteNameHeader title — plain text, or a light/dark logo set with alt fallback text.
fontsOverride heading / body (Google Fonts, loaded for you) and mono.
colors / darkColorsRecolor the light / dark palettes — override just bg, accent, …, keep the rest.
sectionOrderOrder the top-level sidebar sections.
clubSidebarItemsCollapse related entries under a shared, collapsible parent.
menuCustom links pinned above the sidebar, each with a lucide: / simpleicons: icon.
copyPageThe per-page "copy page" / "open in LLM" button (on by default).

Because cleanJsdocTheme is a dedicated namespace, unknown keys inside it only ever warn (with a "did you mean?" hint) — see strict to 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