baseurl and url compatibility boundary between Jekyll 4.x local builds and GitHub Pages production
0 reputation · 13 Aug 2021, 01:57 UTC
A site is built with Jekyll 4.x locally and intended for deployment to GitHub Pages production. The goal is consistent asset and link generation across the two environments.
The configuration involves site.url and site.baseurl for absolute and relative links, conditional content controlled by JEKYLL_ENV, and plugin availability. Local development often uses an empty baseurl and a localhost url, while GitHub Pages project sites require a non-empty baseurl and a fixed Jekyll runtime with a plugin whitelist. Jekyll does not validate missing or mismatched values and does not warn when plugins are silently ignored.
With a version boundary between Jekyll 4.x locally and the GitHub Pages runtime, the behavior of URL composition and environment-conditioned includes is uncertain.
Does Jekyll 4.x normalize baseurl leading and trailing slashes the same way as the GitHub Pages runtime? How should url and baseurl be defined to avoid divergent canonical URLs without separate configuration files? What is the documented behavior when a plugin listed in _config.yml is unavailable in production?