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

Documentation: HTML Proofer with baseurl #4122

Closed
NathanHazout opened this issue Nov 10, 2015 · 3 comments
Closed

Documentation: HTML Proofer with baseurl #4122

NathanHazout opened this issue Nov 10, 2015 · 3 comments

Comments

@NathanHazout
Copy link

I find this page very helpful:

http://jekyllrb.com/docs/continuous-integration/

However when trying to enable htmlproof, I ran into an issue. I am using site.baseurl in all my links, images, etc. And sure enough htmlproof fails on every request.

@parkr
Copy link
Member

parkr commented Nov 24, 2015

To work around this, put your site in a subdirectory of _site which corresponds to your site.baseurl. Run bundle exec jekyll build -d _site/my/baseurl and run htmlproof like usual against _site (the base). The links should then work as intended.

@parkr parkr closed this as completed Nov 24, 2015
@NathanHazout
Copy link
Author

Worked great. Thanks.

@swizca
Copy link

swizca commented Feb 8, 2017

Sadly, the workaround requires hard coding baseurl in more places than just _config.yml. Bummer.

In any case, two more workarounds. (In my case, repo is 'dev', i.e. Links become /dev/<something>.)
--url-swap \'/dev/:/\' (or)
ln -s _site _site/dev

The latter you will have to rerun each time, as build, or even serve, removes the link. You may want to script it. The ln is also circular, but seems to work.

@jekyll jekyll locked and limited conversation to collaborators Jul 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants