@terwer/typedoc-plugin-markdown
v4.0.0-next.11
Published
A plugin for TypeDoc that enables TypeScript API documentation to be generated in Markdown.
Downloads
23
Maintainers
Readme
typedoc-plugin-markdown
A plugin for TypeDoc that renders TypeScript API documentation as Markdown.
What does it do?
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.
Installation
Please note this pre-release version may contain breaking changes within the same semantic version.
npm install typedoc-plugin-markdown@next --save-dev
Usage
typedoc --plugin typedoc-plugin-markdown
Options
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).
File output and content organization
--outputFileStrategy
Determines how output files are generated. Allowed valuesmodules
(all symbols hoisted to a single modules file) ormembers
(each symbol exported to a seperate file). Default valuemembers
.--entryDocument
The file name of the entry document. Default valueREADME.md
.--includeFileNumberPrefixes
Prefixes generated files and folders with number prefixes. This is useful for auto sidebar generation. Defaults tofalse
.--excludeGroups
By default members are grouped by kind (eg Classes, Functions etc). This option excludes such groupings so all members are rendered and sorted at the same level. Defaults tofalse
.
Please see File output and content organization for further documentation.
UI options
--hidePageHeader
Do not print the page header. Defaults tofalse
.--hideBreadcrumbs
Do not print breadcrumbs. Defaults tofalse
.--hideInPageTOC
Do not print in-page index items. Defaults tofalse
.--hidePageTitle
Do not print the page title. Defaults tofalse
.--hideKindTag
Do not print the kind tag identifiers for symbols. Defaults tofalse
.--hideHierarchy
Do not print reflection hierarchy. Defaults tofalse
.--indexPageTitle
The title of the main index / modules page. If not set will default to the project name.--indentifiersAsCodeBlocks
Format signature and declaration identifiers in code blocks. Note iftrue
references will not be linked. Defaults tofalse
.--propertiesFormat
Specify the render style of properties groups for interfaces, classes and type literals. Expected values [list
,table
]. Defaults tolist
.--enumMembersFormat
Specify the render style of Enum members. Expected values [list
,table
]. Defaults tolist
.--typeDeclarationFormat
Specify the render style for type declaration members. Expected values [list
,table
]. Defaults tolist
.
Utility options
--baseUrl
Specifies the base url for internal link. If omitted all urls will be relative. Defaults to.
--anchorFormat
The anchor style to use when linking to internal symbols. Expected values [lowercase
,slug
,none
]. Defaults tolowercase
.--anchorPattern
The anchor pattern to use when linking to internal symbols. e.g customprefix-{{anchor}}.--namedAnchors
Use HTML named anchor tags for implementations that do not assign header ids. Defaults tofalse
.
Frontmatter
If frontmatter is required for adding further metadata please use typedoc-plugin-frontmatter
Output formatting (Prettier)
Generated Markdown is now parsed with Prettier which is backed by the remark-parse package. Parsing documents with Prettier has several benefits:
- Produces a consistent format.
- Remove unnecessary escape characters.
- Formats code blocks inside comment fenced blocks.
Any prettier configuration files discovered will be passed as options to the parser.