typedoc-plugin-markdown
typedoc-plugin-markdown copied to clipboard
Including plugin multiple times breaks sidebar
I use the vuepress-plugin-typedoc
plugin to generate the needed files for vuepress. The thing is I have a mono repo with packages inside them, which are independent of each other and I don't want their types to be mixed together. So I included the plugin multiple times in the vuepress config and it generates the config just fine, except for one thing: the sidebar, which is only generated properly in one of the packages but not the other.
Accessing the subpages like e.g. http://localhost:8080/api/package1/classes/Class1.html
still works fine.
Config:
export default defineUserConfig({
title: 'bug reproduce repo',
bundler: webpackBundler({
postcss: {},
vue: {},
}),
plugins: [
typedocPlugin({
entryPoints: ['packages/package1/src/index.ts'],
tsconfig: 'packages/package1/tsconfig.json',
out: 'api/package1',
}),
typedocPlugin({
entryPoints: ['packages/package2/src/index.ts'],
tsconfig: 'packages/package2/tsconfig.json',
out: 'api/package2',
}),
]
});
How to reproduce:
- Clone
https://github.com/strawberry-choco/typedoc-monorepo-sidebar
- Run
yarn install
- Run
yarn run docs:serve
FYI moving away from the VuePress plugins in favour of a simple Vitepress theme that works outside of plugin ecosystem. Can be used with VuePress. https://github.com/tgreyuk/typedoc-plugin-markdown/tree/next/packages/typedoc-vitepress-theme#readme . Requires pre-release versions.
The vuepress plugin has been officially deprecated. Please use typedoc-vitepress-theme (https://typedoc-plugin-markdown.org/plugins/vitepress) which is VuePress compatible.