TypeDoc Usage
This plugin is like any other TypeDoc plugin and is fully compatible with the TypeDoc ecosystem, supporting other plugins (not specifically targetting HTML output) and the majority of TypeDoc’s options.
Supported TypeDoc Options
Pre-Render Options
The majority of TypeDoc’s options are used internally by TypeDoc to convert a project and define the structure of the models.
These options are output/theme agnostic and can be set in the same way as you would with the HTML theme:
- Configuration ✅
- Input ✅
- Comments ✅
- Organization ✅
- Validation ✅
- Other ✅
Output Options
TypeDoc’s Output options are used by the renderer and theme. The majority of these options are specific to HTML output and are not applicable to markdown output.
Below is a list of which TypeDoc Output options are supported:
--out
✅--navigation
✅ (See Utilizing Navigation)--cleanOutputDir
✅--lang
✅--locales
✅--githubPages
✅ (defaults tofalse
)
All other output options will have no effect on the markdown output.
Option Typings
You can inform your IDE about the shape of the exported options the plugin provides.
JSON Files
You can utilize the provided JSON schema at https://typedoc-plugin-markdown.org/schema.json. For simplicity of configuration, this schema consolidates all options from TypeDoc and the plugin.
{
"$schema": "https://typedoc-plugin-markdown.org/schema.json",
"entryPoints": ["./src/index.ts", "./src/secondary-entry.ts"],
"out": "docs",
"plugin": ["typedoc-plugin-markdown", "some-other-plugin"],
};
JavaScript Files
For JavaScript files, the PluginOptions
interface can be imported to a typedoc.config.js
file with a @type
annotation.
You can use intersection types to combine the TypeDoc options with the plugin options.
// @ts-check
/** @type {import('typedoc').TypeDocOptions & import('typedoc-plugin-markdown').PluginOptions} */
module.exports = {
entryPoints: ['./src/index.ts', './src/secondary-entry.ts'],
out: 'doc',
plugin: ['typedoc-plugin-markdown', 'some-other-plugin'],
};