v4.1 removes relative link
Closed this issue · 2 comments
What package is the bug related to?
typedoc-plugin-markdown
Describe the issue
I am using typedoc
with typedoc-plugin-markdown
to generate .md
documentation of a package.
In the entry point of this package, there is some header documentation for the module with @module
. This gets exported to an index.md
file.
This documentation contains a relative link to somewhere else in my documentation, outside of this package (the exact link is [here](../../api-ssks/index.md)
, if that is relevant somehow).
In v4.0.4 with typedoc v0.25.13, this link is correctly present in the index.md
output.
In v4.1.0 with typedoc v0.26.0, the link is transformed into [here]()
in the output.
TypeDoc configuration
{
"entryPoints": ["./src/lib/main.ts"],
"out": "../../doc-sdk/ssks-2mr",
"plugin": ["typedoc-plugin-markdown", "typedoc-vitepress-theme"],
"categoryOrder": ["*"],
"excludeInternal": true,
"disableSources": true,
"hideBreadcrumbs": true,
"hideGenerator": true,
"sidebar": {
"autoConfiguration": false
},
"githubPages": false,
"readme": "none"
}
Expected behavior
The link should not be removed.
Thanks for raising this. TypeDoc 0.26 treats relative links in a different way (that wasn't being handled). The relative link should now print as intended (available in typedoc-plugin-markdown@4.1.2).
However note that TypeDoc 0.26 attempts to resolve any relative links and output the resolved file to a media directory. Therefore if the link does not exist relative to the input source will will see an error like " [warning] The relative path ../../api-ssks/index.md is not a file and will not be copied to the output directory".
Just to clarify this behaviour (and warning) is not coming from this plugin but from TypeDoc core.
@tgreyuk thanks for your reactivity ! typedoc-plugin-markdown@4.1.2
does fix the problem for me, I am not getting any error from typedoc core.