What is typedoc-plugin-markdown?
The typedoc-plugin-markdown npm package is a plugin for TypeDoc that allows you to generate Markdown documentation from TypeScript projects. It extends TypeDoc's capabilities by providing support for various Markdown formats, making it easier to integrate with static site generators and other documentation tools.
What are typedoc-plugin-markdown's main functionalities?
Generate Markdown Documentation
This configuration file for TypeDoc uses the typedoc-plugin-markdown to generate Markdown documentation. The 'out' option specifies the output directory, and various 'exclude' options are used to filter out unnecessary parts of the documentation.
module.exports = {
plugins: ['typedoc-plugin-markdown'],
out: 'docs',
mode: 'file',
includeDeclarations: true,
excludeExternals: true,
excludePrivate: true,
excludeProtected: true,
excludeNotExported: true,
readme: 'none'
};
Support for Custom Themes
This configuration demonstrates how to use a custom theme with the typedoc-plugin-markdown. The 'theme' option is set to 'custom-theme', which allows you to customize the look and feel of the generated Markdown documentation.
module.exports = {
plugins: ['typedoc-plugin-markdown'],
out: 'docs',
theme: 'custom-theme',
includeDeclarations: true,
excludeExternals: true,
excludePrivate: true,
excludeProtected: true,
excludeNotExported: true,
readme: 'none'
};
Integration with Static Site Generators
This configuration shows how to set up the typedoc-plugin-markdown for integration with static site generators. The 'entryPoints' option specifies the entry points for the documentation, and 'entryPointStrategy' is set to 'expand' to include all relevant files.
module.exports = {
plugins: ['typedoc-plugin-markdown'],
out: 'docs',
mode: 'file',
includeDeclarations: true,
excludeExternals: true,
excludePrivate: true,
excludeProtected: true,
excludeNotExported: true,
readme: 'none',
entryPoints: ['src/index.ts'],
entryPointStrategy: 'expand'
};
Other packages similar to typedoc-plugin-markdown
typedoc
TypeDoc is a documentation generator for TypeScript projects. While it primarily generates HTML documentation, it can be extended with plugins like typedoc-plugin-markdown to support other formats. TypeDoc is the core tool that typedoc-plugin-markdown builds upon.
documentation
The documentation package is a documentation generator for JavaScript and TypeScript projects. It supports multiple output formats, including HTML and Markdown. Compared to typedoc-plugin-markdown, it offers a more general approach to documentation generation and is not specifically tailored for TypeScript.
jsdoc
JSDoc is a popular documentation generator for JavaScript projects. It can be used with TypeScript through type annotations and supports various output formats, including Markdown. While it is more commonly used for JavaScript, it can be adapted for TypeScript projects, making it a versatile alternative to typedoc-plugin-markdown.
typedoc-plugin-markdown
A plugin for TypeDoc that renders TypeScript API documentation as Markdown.
![Build Status](https://github.com/tgreyuk/typedoc-plugin-markdown/actions/workflows/ci.yml/badge.svg?branch=master)
What it does?
The plugin replaces the default HTML theme with a built-in Markdown theme and exposes some additional options.
Useful if documentation is required to be included in project README files, Wikis and static site generators.
Installation
npm install --save-dev typedoc typedoc-plugin-markdown
Usage
Usage is the same as documented at TypeDoc.
typedoc --plugin typedoc-plugin-markdown
The --plugin
arg is optional (all plugins are loaded by default), however if using with the default html theme, use --plugin none
to switch the plugin off.
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 options
See File output options for further documentation.
--entryDocument
The file name of the entry document. Defaults to README.md
.--symbolsWithOwnFile
Determines which symbols should be written to their own file. Expected values [none
, all
] OR Array of [class
, interface
, enum
, function
, var
, type
] Defaults to all
(all symbols exported to an individual file).--fileStructure
Specifies how the files should be generated, grouped by modules or symbol types. Expected values [modules
, symbols
]. Defaults to modules
.
UI options
--hideBreadcrumbs
Do not print breadcrumbs header. Defaults to false
.--hideInPageTOC
Do not print in-page index items. Defaults to false
.--hidePageTitle
Do not print the page title. Defaults to false
.--hideHierarchy
Do not print reflection hierarchy. Defaults to false
.
Utility options
--namedAnchors
Use HTML named anchors tags for implementations that do not assign header ids. Defaults to false
.--publicPath
Specify the base path for all urls. If undefined urls will be relative. Defaults to .
Documentation
License
MIT