Rule to validate links via https://github.com/tcort/markdown-link-check/
See original GitHub issueI’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:
"valid-links": {
"description": "MD###/valid-links - Validate links",
"type": [
"boolean",
"object"
],
"default": true,
"properties": {
"link_types": {
"description": "Types of links to validate",
"type": "string",
"enum": [
"all",
"internal",
"external"
],
"default": "internal"
},
"ignore_patterns": {
"description": "RegExp for ignoring links",
"type": "array",
"items": {
"type": "string"
},
"default": []
},
"http_headers": {
"description": "Url and HTTP header pairs when URLs need additional parameters",
"type": "array",
"items": {
"type": "object"
},
"default": []
},
"additionalProperties": false
/cc @tcort @timmkrause
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Github tool to validate links in markdown - Stack Overflow
Is there a github tool that can run nightly checks to see if all the links in a README.md file (or something similar)...
Read more >How do I validate links in a course? - Canvas Community
As an instructor, you can verify links to course content throughout your course to ensure they are valid. You can check these links...
Read more >textlint-rule-no-dead-relative-link - npm
Textlint rule to validate relative links(including anchor links) in markdown documents. Latest version: 1.0.3, last published: 8 months ago.
Read more >Internal Links Checker | Voters - Docusaurus
Check that internal links on the pages are not broken. ... I've attempted to integrate https://github.com/remarkjs/remark-validate-links using the.
Read more >mkdocs-linkcheck - PyPI
Link Checker for Mkdocs-based static generated sites · Scan and validate links for over 10,000 markdown files per second · Check local (relative) ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just going to note that even a subset of this feature, which would be checking local links like
see [below](#another-heading)
would be quite useful.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