18f.gsa.gov
18f.gsa.gov copied to clipboard
site.baseurl contains no value in circleCI
Actual Behavior
Throughout the blog, people use {{site.baseurl}}
in front of image paths. However, the value of site.baseurl
is not set in _config.yml
. Recently, during a CircleCI run, html-proofer reported 4 broken links. These links were broken because site.baseurl
is empty.
(image alt: four errors from
_site/2022/07/20/senior-executives-pt1/index.html
with links similar to /2022/07/20/senior-executives-pt2
)
Expected Behavior
The expected behavior is for html-proofer to be able to validate internal URLs in circleCI's environment while avoiding breaking functionality locally and in production.
Ideally, we would also document some of the additional config
files, such as _config-blog.yml
which have differing site.baseurl
settings.
Steps to reproduce the behavior
- [ ] Prepend an internal link to another page of the 18F website with
{{site.baseurl}}
- [ ] Make a PR and confirm the html-proofer step of CircleCI fails
This issue is done when
- [ ] Either
{{site.baseurl}}
is set appropriately or html-proofer running in a CICircle environment can check internal links through other means (perhaps a CLI flag or calling a different script from.circleci/config.yml
) - [ ] Internal links continue to work locally (both in docker and without) and in production
- [ ] Documentation has been added explaining how to use
site.baseurl