typedoc-plugin-markdown icon indicating copy to clipboard operation
typedoc-plugin-markdown copied to clipboard

Including plugin multiple times breaks sidebar

Open strawberry-choco opened this issue 2 years ago • 1 comments

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

firefox_9EYlJRg3mR

firefox_k49clb8umb

strawberry-choco avatar Sep 16 '22 10:09 strawberry-choco

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.

tgreyuk avatar May 13 '23 22:05 tgreyuk

The vuepress plugin has been officially deprecated. Please use typedoc-vitepress-theme (https://typedoc-plugin-markdown.org/plugins/vitepress) which is VuePress compatible.

tgreyuk avatar May 03 '24 17:05 tgreyuk