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

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

Open rbala19 opened this issue 2 years ago • 3 comments

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:

  • On source page path = /code/@app/example-library/modules/: -> linking to ../classes/.TestDocusaurusFailure (resolved as: /code/@app/example-library/classes/.TestDocusaurusFailure)

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.

rbala19 avatar Feb 22 '23 01:02 rbala19

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

kaosfere avatar Feb 22 '23 21:02 kaosfere

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",

tgreyuk avatar Apr 18 '23 21:04 tgreyuk

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

vermaysha avatar May 05 '23 07:05 vermaysha