$ npm install typedoc-plugin-markdown
A plugin for TypeDoc that renders TypeScript API documentation as Markdown.
By default, TypeDoc will render API documentation as a webpage, e.g. HTML files.
The plugin replaces the default HTML theme with a built-in Markdown theme and exposes some additional options. This is useful if documentation is required to be included in project README files, Wikis and static site generators.
Please note this pre-release version may contain breaking changes within the same semantic version.
npm install typedoc-plugin-markdown@next --save-dev
The plugin needs to be specified using the plugin argument:
command-line
typedoc --plugin typedoc-plugin-markdown
typedoc.json
{
"plugin": ["typedoc-plugin-markdown"]
}
The following options can be used in addition to relevant TypeDoc options (please note that TypeDoc options specific to the HTML theme will be ignored).
More detailed documentation with examples can be found in the following:
Below is a summary of the available options:
--outputFileStrategymodules (all symbols hoisted to a single modules file) or members (each symbol exported to a seperate file as per HTML theme). Default to members.--includeFileNumberPrefixesfalse.--flattenOutputFilesfalse.--entryFileNameREADME.md is recognised when browsing folders on repos and Wikis, while using index.md. Defaults to README.md.--indexFileNameAPI.md.--skipIndexPage$TYPEDOC_INDEX placeholder key. Ignored if readme=none. Defaults to false.--indexPageTitle--excludeGroupsfalse.--hidePageHeaderfalse.--hideBreadcrumbsfalse.--hideInPageTOCfalse.--hidePageTitlefalse.--hideKindPrefixfalse.--hideHierarchyfalse.--identifiersAsCodeBlockstrue references will not be linked. Defaults to false.--propertiesFormatlist, table]. Defaults to list.--enumMembersFormatlist, table]. Defaults to list.--typeDeclarationFormatlist, table]. Defaults to list.--tocFormatlist, table]. Defaults to list.--baseUrl.--anchorFormatlowercase, slug, none]. Defaults to lowercase.--anchorPattern--namedAnchorsfalse.If frontmatter is required for adding further metadata please use typedoc-plugin-frontmatter.
Generated Markdown is now parsed with Prettier which is backed by the remark-parse package. Parsing documents with Prettier has several benefits:
Any prettier configuration files discovered will be passed as options to the parser.
In addition all test files are linted with markdownlint.
Contributions and suggestions are welcome. Please see the contributing guidelines for further details.
© 2010 - cnpmjs.org x YWFE | Home | YWFE