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
689 stars 172 forks source link

Broken Link caused by Typescript class being defined in an index file #402

Closed rbala19 closed 2 months ago

rbala19 commented 1 year ago

Note: I have previously discussed this bug on the docusaurus repo and they referred me here. I have created a reproduction for the bug in this repo: https://github.com/rbala19/docusarus-reprod. Because this project is inherently a docusaurus project, I have included all docusaurus plugins that I used in combination with typedoc-plugin-markdown - if that makes it difficult to track the bug down, please let me know and I can make a more minimal reproduction of the error.

Reproduction: https://github.com/rbala19/docusarus-reprod

I define a Typescript class in libs/examples/basic/src/index.ts. I additionally list libs/examples/basic/src/index.ts as a module markdown entrypoint in my docusaurus config in doc_site/docusaurus.config.js. Interestingly, upon running docusaurus build, any link to the class defined in index.ts will be malformed.

Exhaustive list of all broken links found:

Seemingly, because index is a keyword used by the compiler, it is also stripped from the URL pointing to the class file. NPM environment is outlined on the reprod. Please let me know if any other information is required.

kaosfere commented 1 year ago

Experiencing this same problem.

Node 16.8.1 NPM 8.19.2 docusaurus 2.2 docusaurus-plugin-typedoc 0.18.0 typedoc-plugin-markdown 3.14.0

tgreyuk commented 1 year ago

Apologies for the delay on this. The example repo was very useful. Marking this fixed in next version.

Can be tested with

"docusaurus-plugin-typedoc": "next",
"typedoc-plugin-markdown": "next",
vermaysha commented 1 year ago

Apologies for the delay on this. The example repo was very useful. Marking this fixed in next version.

Can be tested with

"docusaurus-plugin-typedoc": "next",
"typedoc-plugin-markdown": "next",

Maybe this is off topic, but this issue also occurs in the vuepress-plugin-typedoc package.

vuepress-plugin-typedoc 0.12.1

tgreyuk commented 2 months ago

typedoc-plugin-markdown@4.0.0 docusaurus-plugin-typedoc@1.0.0