typedoc-plugin-redirect
v1.0.0
Published
Add redirect pages to your generated TypeDoc site.
Downloads
13
Readme
typedoc-plugin-redirect
Add redirect pages to your generated documentation.
Usage
npm install --save-dev typedoc-plugin-redirect
// typedoc.config.mjs
/** @type {Partial<import("typedoc").TypeDocOptions>} */
const config = {
plugin: ["typedoc-plugin-redirect"],
redirects: {
// If the value starts with http[s]://, it will redirect to an external site.
"example.html": "https://example.com",
// If the value starts with a slash, the link will be included verbatim.
"contact.html": "/cgi-bin/contact.php",
// Otherwise, the link will be interpreted relative to the output directory.
"DocsClass.html": "api/classes/DocsClass.html",
// If the key ends with a trailing slash, "/index.html" will be appended to form
// the output file name. The following two entries are equivalent.
"options/": "documents/Options.html",
"options/index.html": "documents/Options.html",
},
};
Example
See an example of this plugin in action.