-
-
Notifications
You must be signed in to change notification settings - Fork 189
Open
Description
i have made a test .md file at: https://gist.githubusercontent.com/katrinafyi/daefc003e04b7c2f73cb54615510dce0/raw/fe1b03f7a328e169b7d6445ecbac34053b526e8f/lychee-url-mapping-test-file.md
this has a number of links, one of which is [root](/root). if we point lychee at this URL with the root-dir option, it looks does this:
$ lychee --dump --root-dir /tmp https://gist.githubusercontent.com/katrinafyi/daefc003e04b7c2f73cb54615510dce0/raw/fe1b03f7a328e169b7d6445ecbac34053b526e8f/lychee-url-mapping-test-file.md
[...]
https://gist.githubusercontent.com/tmp/rootthis is merging the root-dir into the implicit base url from the file's URL location. this is the same as it does with --root-dir + --base-url and it is always wrong.
two possible fixes to make this make sense:
- only apply root-dir to local files
/rootlink in remote files should become/tmp/root
i strongly suggest the first way. in fact, i wrote the --root-dir help assuming it already worked like that:
lychee --root-dir <ROOT_DIR>: Root directory to use when checking absolute links in local files.
Metadata
Metadata
Assignees
Labels
No labels