deadlink
deadlink copied to clipboard
:skull: Checks and fixes URLs in code and documentation.
Parses text files for HTTP URLs and checks if they are still valid. Install with
pip install deadlink
and use as
deadlink check README.md # or multiple files/directories
# or deadlink c README.md
To explicitly allow or ignore certain URLs, use
deadlink check README.md -a http: -i stackoverflow.com github
This only considers URLs containing http:
and not containing stackoverflow.com
or
github
. You can also place allow and ignore lists in the config file
~/.config/deadlink/config.toml
, e.g.,
allow_urls = [
"https:"
]
ignore_urls = [
"stackoverflow.com",
"math.stackexchange.com",
"discord.gg",
"doi.org"
]
igonore_files = [
".svg"
]
See
deadlink check -h
for all options. Use
deadlink replace-redirects paths-or-files
# or deadlink rr paths-or-files
to replace redirects in the given files. The same filters as for deadlink check
apply.
Example output: