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
697 stars 173 forks source link

typedoc-plugin-markdown - 4.0.0-next.17: `docusarus run` fails if there's a sidebar config for generated docs in sidebars.js #457

Closed aamir1995 closed 11 months ago

aamir1995 commented 1 year ago

Hello, thanks for this awesome project :)

I'd like to report a possible bug that's only happening when you use 4.0.0-next.17, I tried downgrading to 4.0.0-next.16 and it worked like a charm!

It seems that when you're on 4.0.0-next.17, command docusaurus run results in an error if there's a sidebar config in sidebars.js.

in my case, I have defined some config for generated docs in the sidebars.js as follows:

const sidebars = {
  mainSidebar: [
    {
      type: "category",
      label: "Documentation",
      link: {
        type: "generated-index",
        title: "Docs",
        description: "Learn more about the APIs",
      },
      collapsed: false,
      items: [
        {
          type: "category",
          label: "web_app",
          link: {
            type: "doc",
            id: "web_app/index",
          },
          items: [{ type: "autogenerated", dirName: "web_app" }],
           },
      ]
    }
  ]
}

but if you remove this config and run docusaurus run command, it will work fine but if the sidebar config exists it results in an error that looks like this:

Screenshot 2023-08-07 at 3 47 36 PM
tgreyuk commented 1 year ago

Thanks - fixed in 4.0.0-next.18