question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rule to validate links via https://github.com/tcort/markdown-link-check/

See original GitHub issue

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:

    "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:open
  • Created 5 years ago
  • Reactions:3
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
borekbcommented, Nov 16, 2020

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.

1reaction
DavidAnsoncommented, May 23, 2018

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found