Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aduh95: I find there's something interesting, maybe it will cause something bad:
If I use "console.log" to print the path out to check whether these path files are really not existing, code like this:
And here's the result (some part of it):

This experiment is done locally on my PC of folked node.org project, however, the pdf files really exist:
There're also many files meeting with this problem.
You can have a try at node.org (local project on windows by adding the log), and then check the outputted result.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another problem is: We're usually referring the relative paths in our md file for each other, for example in the node.org project, we have a reference like this:
This link, will be generated to "http" by build.js in nodejs.org project, however it has a "file:///" as the URL at local disc, this means in remark-lint-nodejs-links.js, the actual path of the file would be:
Of course, it doens't exist, but it EXISTS really when deploying onto the server with an "https://nodejs.org/en/docs/guides/getting-started-guide/".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On nodejs/node repo, we forbid any path that starts with a
/
, we expect every path to be relative.If nodejs/nodejs.org uses absolute paths, the way forward would be to add an option to specify what is the absolute base. The implementation would look something like that:
I suspect the
static
folder you show in the screen shot is not atD:\static
, right? Instead, I suspect it is located atD:\Projects\node_proj\nodejs.org\static
or something like that.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aduh95:
Yes, that's the big problem.
BTW:I'm not sure how many kinds of paths we have now in these *.md files, sometimes we will have a path with a "#", pointing at a certain pharagraphu in another md file, and sometimes we have something like :/en/about, but it points at /en/about/index.md....
Too complicated to think...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may be missing some, but I think there are only 5 types of URL:
https://nodejs.org/en/#anchor
(currently supported, ignored if using a protocol other thanfile:
).//nodejs.org/en/#anchor
(not supported, but also not used AKAICT)./en/#anchor
(not supported, that's the issue you are referring to)../en/#anchor
(supported).#anchor
(supported).If we want to support origin-relative URLs, we need to either:
In either case, it needs to come from a configuration, as we wouldn't want to have an origin-relative URL in the nodejs/node repo.
I don't think that's going to be a problem as long as
en/about
exists on the file system (it doesn't matter if it's a directory or a markdown file).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your suggestions in detail, and after deep thought for a while, I don't it's good to mix your corrent checking with this specific kind of md checks. What's more, considering there's a problem of ASCII ordering and I've disabled the check. So maybe I'll consider making another tool or package from npm instead of directly writing in your package :)