Skip to Content
DocsOptionsOutput

Output

Output options control TypeDoc’s generated output. These options mainly apply to TypeDoc’s default HTML renderer, but this plugin supports or extends a subset.

The options listed here are the output options that this plugin supports or extends.

outputs

Specifies the outputs which should be rendered by TypeDoc.

This plugin exposes an additional output named markdown and sets it as the default output.

This is useful if you want to generate markdown files alongside the other TypeDOc outputs html and json on the same task.

If you are only generating a single documentation instance, you can set the out option to the desired path and omit the outputs option entirely.

typedoc.json
{ "outputs": [ { "name": "markdown", "path": "./docs_markdown" }, { "name": "html", "path": "./docs_html" }, { "name": "json", "path": "./docs.json" } ] }

out

Specifies the location the markdown should be written to.

Defaults to "/.docs"

If specified, the outputs option will be overwritten by this option

typedoc.json
{ "out": "<path/to/documentation/>" }

router

Selects the router used to determine the file and folder structure.

Defaults to "member"

This option determines the folder structure of the generated markdown files.

TypeDoc ships with several built-in routers and additionally this plugin provides additional custom routers.

Custom Routers

  • “member” (default) - Generates an individual file for each exported module member kind. Pages are grouped by kind within their respective module hierarchy. This mirrors a combination of TypeDoc’s kind and structure routers.
  • “module” - Generates a single file for every module and namespace where all module members are hoisted to a single file. This creates a flat navigation structure and reduces the amount of files generated.

“member” structure:

  • README.md
      • ClassA.md
      • ClassB.md
      • FunctionA.md
      • FunctionB.md
      • ClassA.md
      • ClassB.md

module structure:

  • README.md
  • module-a.md
  • module-b.md

TypeDoc Core Routers

TypeDoc ships with several built-in routers used by the HTML theme. These routers are decorated to fix the .html extension and additionally support the file options of this plugin.

This provides the ability to generate output files in the same structure as the default HTML theme but rendered using the plugin’s Markdown theme.

Please see TypeDoc’s router  documentation for details of available core routers.

typedoc.json
{ "router": "kind" }

lang

Sets the language of the translations used when generating documentation.

Defaults to "en".

Available languages are "de", "en", "ja", "ko", "zh".

typedoc.json
{ "lang": "fr" }

cleanOutputDir

Used to prevent TypeDoc from cleaning the output directory.

Defaults to "false"

typedoc.json
{ "cleanOutputDir": true }
Determines how the navigation JSON structure will be built.

Unlike the default HTML theme, Markdown output does not emit navigation automatically. If you want to expose the project structure (for example, to generate a sitemap or build a custom sidebar) you can access the navigation data in two ways:

  • Output to a file by using the navigationJson option to write the navigation JSON for later use.
  • Access in place by reading the JSON from rendererEvent.navigation when working with Async Jobs.

This option also allows you to customize the JSON structure based on categories, groups, and folders. By default, the navigation format aligns closely with the HTML theme.

Typings for the navigation JSON are available via the NavigationJSON export:

import type { NavigationJSON } from 'typedoc-plugin-markdown';
typedoc.json
{ "navigation": { { "includeCategories": true, "includeGroups": true, "includeFolders": true, }, } }

includeHierarchySummary

Specifies whether or not to generate a dedicated hierarchy page.

Defaults to false.

This page lists the full class hierarchy for generated members.

typedoc.json
{ "includeHierarchySummary": true }
Last updated on