linkcheck icon indicating copy to clipboard operation
linkcheck copied to clipboard

Per-domain ignore list

Open mwgamble opened this issue 3 years ago • 1 comments

It would be helpful to exclude certain domains from being checked, for when you know ahead of time that checking links on certain domains simply won't work. These are often for private websites, or websites that will require authentication.

mwgamble avatar Jan 12 '22 03:01 mwgamble

@mwgamble you can already do this, see this example: https://github.com/cytopia/linkcheck#ignore-specific-urls

# Ignore localhost, 127.0.0.1 and *.loc domains
linkcheck -i '^http(s)?:\/\/(localhost)|(127\.0\.0\.1|.)|(.+\.loc).*$' path/to/my/docs

This is (among others) ignoring anything from *.loc tld. You can for instance do:

linkcheck -i '^http(s)?:\/\/(.+\.example\.com).*$' path/to/my/docs

or to include the domain itself as well:

linkcheck -i '^http(s)?:\/\/(.*example\.com).*$' path/to/my/docs

cytopia avatar Apr 07 '22 11:04 cytopia