-
-
Notifications
You must be signed in to change notification settings - Fork 732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rule to validate links via https://github.com/tcort/markdown-link-check/ #121
Comments
Love the idea! This comes up from time to time, so definitely worth thinking about. I think it would be pretty straightforward to implement as a custom rule, especially because the parser will have already pulled out each of the URLs. What I’d like to do is start everything as a custom rule, see how it does, then look at pulling successful ones into the core library. (With the caveat that I try hard to avoid new dependencies, so maybe attempt this using only the core Node.js modules.) If you prototype something here, I'd be happy to answer any questions that come up! (See also https://github.com/DavidAnson/check-pages for a project of mine that checks links.) |
Sounds good, I'll see if I can figure out setting up a separate rule repo. |
Don’t assign an MDxxx name, just use a name like validate-links and it should be possible to pull it in pretty much as-is. Some other guidance here: https://github.com/DavidAnson/markdownlint/blob/master/doc/CustomRules.md |
Just wanted share my experience. I'm using both markdownlint-cli and textlint in my documentation projects. The following rule in textlint takes care of link validation: |
Just going to note that even a subset of this feature, which would be checking local links like |
Upcoming rule MD051 will implement this behavior for local links (#something). |
Update: I published a new npm package to add this custom rule (validating "dead" relative links): https://github.com/theoludwig/markdownlint-rule-relative-links. |
FYI the markdownlint-rule-relative-links plugin has been updated to support links to anchors like MD051 does. |
I've been using https://github.com/tcort/markdown-link-check/ as a separate check to validate links in markdown. I was starting to see if I could leverage the
.markdownlint.json
as a config format for that project too and realized maybe it might make sense to just add that functionality as a rule in this project.Because it can go out and create network requests, I think having it off by default would make sense.
I may just do it as a custom rule in the end, but I figured I'd check to see if there is interest in this as a core rule.
Example config schema:
/cc @tcort @timmkrause
The text was updated successfully, but these errors were encountered: