Skip to main content

package-documentation-hook

TL;DR

Allows you to encapsulate the documentation of the package in a package.

Integration:

1. Add dependency

yarn add -WD "@docusaurus-tde/package-documentation-hook"

2. Connect the hook

docusaurus-tde.config.js

module.exports = {
hooks: [
'@docusaurus-tde/package-documentation-hook',
]
}

Hook configuration:

type linkType = {
label: string;
route: string;
location: string;
}

type packageDocumentationHookProps = {
docRootName?: string; // default: 'doc'
showLastUpdateAuthor?: boolean; // default: true
showLastUpdateTime?: boolean; // default: true
dropdownBuilder?: (links: linkType[], props: Required<packageDocumentationHookProps>) => Array<{
type: 'dropdown',
label: string;
items: Array<{ label: string; to: string }>;
}>
}