Join Nostr
2026-11-25 00:15:52 UTC

Dave Rahardja on Nostr: I found something weird about #Jekyll’s `site.url` property: if I do local testing ...

I found something weird about #Jekyll’s `site.url` property: if I do local testing (`jekyll serve`) and then build the site (`jekyll build`), the `site.url` property seems to be off-by-one. In other words, `jekyll build` will often get the value of some localhost address in the production build, and `jekyll serve` gets the value of the deployment server.

This is really odd, because my _config.yml `url` property contains the actual site’s URL, which I override only in `jekyll serve` using command line options. My guess is that it’s some kind of caching problem in Jekyll. I’ve worked around it by removing all absolute URLs and using relative paths.

Am I doing something obviously wrong?

I’m running Jekyll 4.3.4 FWIW.