A TypeDoc plugin that lets you integrate your own pages into the documentation output
For more infos, please refer to the documentation
Create markdown files into your repository (by default in the pages
directory).
Configure your pages tree in the typedoc configuration. Example:
{
"pluginPages": {
"pages": [ { "name": "My project name", "moduleRoot": true, "children": [
{ "name": "Some cool docs", "source": "cool-docs.md" },
{ "name": "Configuration", "childrenDir": "configuration", "children": [
{ "name": "Configuration file", "source": "file.md" },
{ "name": "CLI options", "source": "cli.md" },
] },
] } ]
}
}
See the pages tree guide, or the options documentation page for more infos.
In any markdown content (in README, pages, or doc comments), use the {@page ...}
tag to create a link to a page.
Syntax:
{@page <path-to-file>[ link label]}
<path-to-file>
: A path to the desired page. Checkout this documentation page for more infos on the syntax of the path.[ link label]
: allow to specify the text in the link. If not set, the target page name is used.npm install --save-dev @knodes/typedoc-plugin-pages typedoc@^0.23.0
This plugin version should match TypeDoc ^0.23.0
for compatibility.
Note: this plugin version was released by testing against
^0.23.28
.
NOTE: This plugin is based on typedoc-plugin-loopingz-pages, which is in turn a fork of typedoc-plugin-pages. Integrating it in this monorepo should (I hope) make easier maintenance.
Here is a samble of this monorepo configuration:
module.exports = {
// ...
name: 'Knodes TypeDoc Plugins',
entryPoints: [
'packages/*',
],
entryPointStrategy: 'packages',
pluginPages: {
pages: [
{
name: 'Knodes TypeDoc Plugins', // The section containing the monorepo root pages
moduleRoot: true,
children: [
{ name: 'Changelog', source: './CHANGELOG.md' },
],
},
{
name: '@knodes/typedoc-plugin-pages', // A pages section for the package `@knodes/typedoc-plugin-pages`
moduleRoot: true,
source: 'readme-extras.md', // This is a module root page. `readme-extras.md` will be appended to the module index
children: [ // Children pages
{ name: 'Using options', source: 'options.md' },
{ name: 'Pages tree', source: 'pages-tree.md' },
],
},
// ...
],
// ...
},
// ...
};
See Using options for a detailed list of options, and Pages tree to read more about why the pluginPages.pages
option is structured like this.
Generated using TypeDoc