typedoc2md / typedoc-plugin-markdown

A plugin for TypeDoc that enables TypeScript API documentation to be generated in Markdown.
https://typedoc-plugin-markdown.org
MIT License
703 stars 175 forks source link

Including plugin multiple times breaks sidebar #352

Closed strawberry-choco closed 4 months ago

strawberry-choco commented 2 years ago

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:

firefox_9EYlJRg3mR

firefox_k49clb8umb

tgreyuk commented 1 year ago

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 commented 4 months ago

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