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

feature: support URL masquerade #614

Open
major0 opened this issue Feb 21, 2022 · 0 comments
Open

feature: support URL masquerade #614

major0 opened this issue Feb 21, 2022 · 0 comments

Comments

@major0
Copy link

major0 commented Feb 21, 2022

Summary

Support testing of statically generated websites via a --masquerade option similar to the W3C's checklink tool. This would allow running linkchecker as part of a pre-commit hook when generating static websites and leverage all the fun features of linkchecker.

--masquerade "real-prefix surrogate-prefix"
   Perform a simple string substitution: URIs which begin with the string "real-prefix" are rewritten
   using the "surrogate-prefix" before being dereferenced.  Useful for making a local directory
   masquerade as a remote one.
 
   For example:
      --masquerade "http://example.com/x/y/z/ file:///my/local/dir/"

   If the document being checked contains a link to http://example.com/x/y/z/foo.html, then the
   local file system will be checked for file:///my/local/dir/foo.html.

    --masquerade takes a single argument consisting of two URIs, separated by whitespace.  The
   quote marks are not part of the argument, but one usual way of providing a value with embedded
   whitespace is to enclose it in quotes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants