Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per-domain ignore list #26

Open
mwgamble opened this issue Jan 12, 2022 · 1 comment
Open

Per-domain ignore list #26

mwgamble opened this issue Jan 12, 2022 · 1 comment

Comments

@mwgamble
Copy link

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.

@cytopia
Copy link
Owner

cytopia commented Apr 7, 2022

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants