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
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.
{
"outputs": [
{
"name": "markdown",
"path": "./docs_markdown"
},
{
"name": "html",
"path": "./docs_html"
},
{
"name": "json",
"path": "./docs.json"
}
]
}
out
Defaults to
"/.docs"
If specified, the outputs option will be overwritten by this option
{
"out": "<path/to/documentation/>"
}
router
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
andstructure
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.
{
"router": "kind"
}
lang
Defaults to "en"
.
Available languages are "de"
, "en"
, "ja"
, "ko"
, "zh"
.
{
"lang": "fr"
}
cleanOutputDir
Defaults to "false"
{
"cleanOutputDir": true
}
navigation
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';
{
"navigation": {
{
"includeCategories": true,
"includeGroups": true,
"includeFolders": true,
},
}
}
includeHierarchySummary
Defaults to false
.
This page lists the full class hierarchy for generated members.
{
"includeHierarchySummary": true
}