A CLI tool for checking for dead links in a markdown file
Find a file
2023-12-29 23:09:13 +03:00
.github add usage and license information 2023-12-24 22:15:51 +03:00
nix Initial commit 2023-12-24 20:13:31 +03:00
vendor Initial commit 2023-12-24 20:13:31 +03:00
.envrc direnv 2023-12-24 21:58:33 +03:00
.gitignore ignore build artifacts 2023-12-24 21:58:57 +03:00
flake.lock Initial commit 2023-12-24 20:13:31 +03:00
flake.nix clean up flake 2023-12-24 21:20:12 +03:00
go.mod Initial commit 2023-12-24 20:13:31 +03:00
go.sum Initial commit 2023-12-24 20:13:31 +03:00
LICENSE Initial commit 2023-12-24 20:13:31 +03:00
main.go cocurrency 2023-12-29 23:09:13 +03:00
output.md cocurrency 2023-12-29 23:09:13 +03:00
README.md add usage and license information 2023-12-24 22:15:51 +03:00

🚨 mdlinkt

A CLI tool for detecting dead or inaccessible links in markdown files.

Usage

To check a markdown file for dead or inaccessible links

mdlinkt -file your-file.md

This will return each tested link and a summary message in an example markdown file containing 1 valid and 1 invalid file.

mdlinkt -file test.md
2023/12/12 12:00:00 ERROR Invalid link: https://probablynotvalid.com
2023/12/12 12:00:00 INFO Summary: 1 valid links, 1 invalid links

Should you want more details on the links that are scanned, you may pass the -verbose flag.

2023/12/12 12:00:00 INFO https://github.com: 200
2023/12/12 12:00:00 ERROR Invalid link: https://probablynotvalid.com
2023/12/12 12:00:00 INFO Summary: 1 valid links, 1 invalid links

In case of invalid links, the program will exit with exit code 1, making it perfect for usage in GitHub actions or other pipelines.

Hacking

A nix flake is provided. Use direnv allow or nix develop to enter the development shell.

Contributing

PRs are always welcome.

License

mdlinkt is licensed under the GPLv3. See LICENSE for more details.