Quick Start

Installation

Install Docusaurus in the root of your project and install the plugin dependencies in the same location as the Docusaurus website directory.

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

Usage

Create a Docusaurus project

https://docusaurus.io/docs/installation

A typical project structure might look like this but can be customized to your needs:

    • docusaurus.config.js
    • package.json
    • sidebars.js
  • package.json
  • tsconfig.json

Add the plugin to docusaurus.config.js

Add the plugin to docusaurus.config.js and specify the required options.

The following options can be passed to the config:

docusaurus.config.js
module.exports = {
  // Add option types
  plugins: [
    [
      'docusaurus-plugin-typedoc',
 
      // Options
      {
        entryPoints: ['../src/index.ts'],
        tsconfig: '../tsconfig.json',
      },
    ],
  ],
};

Options can also be declared using a typedoc.json file. Please note that options declared with typedoc.json will overwrite options declared in docusaurus.config.js.

Run Docusaurus

You can generate the docs by either:

  • Running Docusaurus by using the start or build cli commands.
  • Building the docs independently by running the custom cli command docusaurus generate-typedoc and then running Docusaurus at another time.

View the docs

Once built the docs will be available at /docs/api (or equivalent output directory).

e.g. http://localhost:3000/docs/api