typedoc-plugin-docusaurus

1.0.14 • Public • Published

typedoc-plugin-docusaurus

npm

A plugin for TypeDoc that exposes themes and options for rendering markdown for Docusaurus

Getting started

Installation

npm install --save-dev typedoc typedoc-plugin-docusaurus

How to use

The plugin provides an additional markdown theme.

node_modules/.bin/typedoc --theme markdown

Additional arguments

The plugin exposes the following additional arguments:

  • --mdFlavour<github|bitbucket>
    Specifies the markdown rendering engine. Defaults to github.
  • --mdHideSources
    Suppress sources from output
  • --mdSourceRepo<path.to.repo>
    The source repo to use for source file linking. Will be ignored on github flavoured projects.
    For bitbucket use: https://bitbucket.org/owner/repository_name.

Example output

The following DocComments:

/**
 * This is a function with multiple arguments and a return value.
 * @param paramZ  This is a string parameter.
 * @param paramG  This is a parameter flagged with any.
 */
 
export function functionWithArguments(paramZ:string, paramG:any):number {
    return 0;
}

Will generate the following output:

functionWithArguments(paramZ: string, paramG: any): number

Defined in functions.ts:41

This is a function with multiple arguments and a return value.

Parameters:

Param Type Description
paramZ string This is a string parameter.
paramG any This is a parameter flagged with any.

Returns: number

Samples

Browse some mocked samples to view further examples of generated output.

Acknowledgements

  • This is a quick and dirty fork of Thomas Grey's typedoc-plugin-markdown with a few minor edits required to flatten the output and make it suitable for direct use in Docusaurus. When we have more time we will come back and make this a parameter switch and submit a pull request to typedoc-plugin-markdown. Until then, feel free to submit pull requests to this one if it gets out of date with upstream.

  • He thanked kimamula's typedoc-markdown-theme for the inspiration behind this project.

Package Sidebar

Install

npm i typedoc-plugin-docusaurus

Weekly Downloads

0

Version

1.0.14

License

MIT

Unpacked Size

36.6 kB

Total Files

52

Last publish

Collaborators

  • offgridnetworks