Closed sharky98 closed 9 months ago
Could this be the culprit? 🧐
function packageHeader()
not using context.relativeURL()
Compared to function projectHeader()
using context.relativeURL()
EDIT: I tried monkey patching it and it did create relative links, but to the root project README.md
file, not the package README.md
file.
EDIT 2: I trying to figure out some more using some console.log
in that header.ts
file. However, I was taken aback a bit. It seems that the package-a
and package-b
README.md
and modules.md
files are correctly created. However, that README.md
file of the package seems to be absent from there. As such, when in package-a/classes/ClassA.md
, the context consider monorepo
as its parent package (in fact using the project
term) and not package-a
. I am lost from there. Will wait for your feedback! 🙃
EDIT 3: In any case, the markdown output is WAY better than the v3! 🎉✨ I love it!
Thanks for feedback and the detailed description is very much appreciated. You were on the right lines about including the relativeUrl method, but the url needed to include the package directory.
Fix in typedoc-plugin-markdown@4.0.0-next.24 .
Hello,
I have an issue where the links to the module
README.md
files are not relative from the member pages when building a doc for a monorepository ("entryPointStrategy": "packages"
, based on Gerrit0 example).Version:
4.0.0-next.23(typedoc@0.25.1)
I am using the default
outputFileStrategy
(members
).For example, taking the tree shown in the option guide.
In the page
ClassA.md
, the header would uses[README](README.md) ∙ [API](../modules.md)
for the links, correctly using the relative for themodules.md
page, but not for theREADME.md
page.It is to note that the breadcrumbs do get relative links as expected, but they all point to the modules files, which already get its relative links correctly in the header.
[API](../../../modules.md) > [package-1](../modules.md) > Content
I was looking at the tests, and I'm not sure if I am reading this right, but it looks that this case is not covered. Seems that
README.md
themselves are checked.https://github.com/tgreyuk/typedoc-plugin-markdown/blob/3a0a5bea81b14857d387fbfba599200212634eeb/packages/typedoc-plugin-markdown/test/specs/__snapshots__/readmes.spec.ts.snap#L20-L48
modules.md
links, not the readme (under bothpackage-1
andpackage-2
, the URL is only for themodules.md
and there is noREADME.md
URLs.https://github.com/tgreyuk/typedoc-plugin-markdown/blob/3a0a5bea81b14857d387fbfba599200212634eeb/packages/typedoc-plugin-markdown/test/specs/__snapshots__/navigation.spec.ts.snap#L3-L44
https://github.com/tgreyuk/typedoc-plugin-markdown/blob/3a0a5bea81b14857d387fbfba599200212634eeb/packages/typedoc-plugin-markdown/test/specs/__snapshots__/groups.spec.ts.snap#L493-L509
README.md
files are detected.https://github.com/tgreyuk/typedoc-plugin-markdown/blob/3a0a5bea81b14857d387fbfba599200212634eeb/packages/typedoc-plugin-markdown/test/specs/__snapshots__/urls.spec.ts.snap#L113-L124
packages
entry point strategy; but they do get relative URL to theREADME.md
files.