Closed atteggiani closed 3 months ago
Thank you for testing and creating the issue @atteggiani Looks like a bug. I'll do a fix.
UPdATE: On inspecting this further, I found that the issue needs some updates to the logic on how linkspector is processing links. The issue is that path.join(dirname, link.url) is not correctly resolving relative paths. dirname is the directory where linkspector is running, not the directory of the file that contains the link.
To resolve this issue, I'll need to separate hyperlinks checks and file links check. This will need some work.
is baseURL
a required parameter? What if we are adding new docs that are not yet published?
@matifali
is
baseURL
a required parameter?
No, it is not a required parameter. I'll update the README to reflect this.
What if we are adding new docs that are not yet published?
If you are specifying links to the new doc set in your docs with [sample](/new-link.md)
you can specify baseURL
with the dir path, for example: baseUrl: ./new-folder/new-docs
. Try that and create an issue if that doesn't work.
Hello, I am trying to update my CI/CD from using Markdown link check action to Linkspector.
I set my baseURL in the configuration file, but only the absolute links get correctly evaluated, while all the markdown links that use relative paths fail.
For example, if my root directory is structured like this:
in the the
file1.md
a link formatted as:../dir2/file2
will fail ❌/dir2/file2
will succeed ✅However, they both are valid links.
Am I missing something? Is there a way to make links with a relative path not being falsely detected as failing?
Thank you!