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

Is it possible to map an external URL pattern to make it appear local? #489

Closed
pete-woods opened this issue Sep 13, 2018 · 4 comments
Closed

Comments

@pete-woods
Copy link

I'm generating my blog using Hugo and testing with htmlproofer on the CLI.

In some places Hugo generates absolute URLs for some links, and htmlproofer tries to validate these as external URLs. So if I add a new post in the blog, the index's reference to it fails, as it checks against my live blog deployment, instead of checking the local filesystem.

It'd be great if I could tell htmlproofer that e.g. https://pete-woods.com was the external path of my site, and to treat URLs starting with that path as internal.

@pete-woods
Copy link
Author

Currently I have to do

--url-ignore='/pete-woods.com/'

@StaphSynth
Copy link

I'm having the same issue in Jekyll. The Jekyll SEO plugin uses absolute URLs which causes the build to fail because the page doesn't exist in production yet.

@pete-woods
Copy link
Author

Just having a browse through the source, while I have a bit more time:
p.option 'internal_domains', '--internal-domains domain1,[domain2,...]', Array, 'A comma-separated list of Strings containing domains that will be treated as internal urls.'

@pete-woods
Copy link
Author

That switch worked for me.

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