A thinking stick figure in the posture of "The Thinker"
September 20th, 2025

Hugo was fun while it lasted

Techs

Until I realize how inconvenient it is to deploy the site to edge (Vercel).

Context: This morning I discovered that, when I try to post anytime from 00:00 to 07:59 UTC+8, Hugo will not publish my new posts. It was weird because I always thought that the build time follows my system time. But obviously it wasn't.

Digging deeper, it seems that Hugo (and most other web applications) defaults to UTC+0 when building the site, as well as displaying dates in UTC+0 format. To override this behavior, it is recommended that you set the timeZone variable in hugo.toml or config.toml.

timeZone = "Asia/Hong_Kong"

Problem solved!??!?!?!?! Yeah... except it didn't work. My posts were still not being published, only appearing once it is past 08:00 (which is a new day for UTC+0). I decided to add a temporary tag to see the time at building

{{ time.Now | time.Format "2006-01-02 15:04 -07:00" }}

Guess what? It shows up like this: 2025-09-19 00:02 -00:00

The time zone setting just does not work whatsoever. I dug deeper and found multiple threads where people also had the same problem as mine. I concluded that Hugo uses the system time when building the site, and does not honor the timeZone setting. What's the point of letting users set a timeZone if it uses system local time anyway? Using the buildFuture setting does allow building posts that may conflict with timezone settings. But I decided nope, let's go back to Jekyll. I learned of Zola the other day, but I will stay with Jekyll for the time being.

Hugo builds really fast, I got to admit, I love how fast it deploys compared to Jekyll. But since I deployed to Vercel the time needed to build my site has been drastically reduced, so that's a non-issue. Deploying on Vercel is largely the same as deploying on GitHub. Only that you need to set the following variable in vercel.json

"cleanUrls": true

Otherwise the url in your site won't work.

That's it. I am done with Hugo for now. Yesterday on the omg.lol Discord I said I would leave Hugo until it inevitably breaks. I didn't know it would break this fast. But the good news is, my Cats site still works.

powered by scribbles