April 24, 2022

590 words 3 mins read

Quick Take: Everything Breaks - Even Static Sites

Two years ago I moved this blog from Wordpress over to Hugo Static Site Generator. The idea was to get the “backend” stuff out of the way of the writing. Also it’d be more secure and static, so not breaking at random.

Well, Yesterday I made my first post after a year hiatus and spent… a fair amount of time fixing broken things. Now, the Obviate.io site proper didn’t break. It continued to work flawlessly without me so much as giving it a single thought, for an entire year. Because it’s hosted on AWS S3 & Cloudflare - I never had to worry. Unfortunately the backend isn’t so easy. So what broke?

#1 - My “setup” instructions (aka the README.md) weren’t fully correct. Not surprisingly I’m working on a different computer from the last time I wrote a post. This isn’t entirely a static site generator fault, but it does go to show that sometimes systems like Wordpress are “easier” because you don’t need to worry about what’s installed or how it’s configured.

#2 - The “tweet” keyword I used in the WWDC2020 article was deprecating the way I had previously used it. Didn’t strictly need to fix that, but warnings annoy me. Fortunately I’d only started to use that keyword so it was only a single article’s worth of issues. Also one of the tweets was deleted which did crash the build. Fortunately I found the tweet in Archive.org so I could put up a screenshot of it, but the entire “it crashed the build” has the potential to be very obnoxious in the future. May be better to always screenshot tweets rather than embedding them.

#3 - Hugo has made a few changes in the time, including a few new version. In 2022 the last build was done with v0.75.1 and now Hugo is on v0.97.3. So far the biggest issue I’ve found is that google_news keyword is deprecated. Not a huge deal, but now I need to go update the upstream theme repo (and figure out how to deal with git submodules again). It could have been a lot worse, but I forked and used my own theme - so nothing else has changed/broken in the theme.

#4 - Build broke because the docker image was out of date. The image I was previously using as part of the Gitlab CI/CD process hadn’t been update in 2 years. So all the changes I made to fix everything else above…broke the build. Fortunately this was fairly quick fix as all I had to do was fine the correct image to use and as it turns out, they now have an official one: registry.gitlab.com/pages/hugo/hugo_extended:latest

#5 - Lurking changes not found yet? New features? Who knows. The above four are the concrete things broken in the initial update, but I strongly suspect there will be more found down the line.

Overall, it wasn’t too painful to get things up to date. The process was a little yakshaving because even if nothing changes on YOUR side, everything else in the ecosystem is changing. Technical debt still accrues regardless of you pay attention to it or not. Hugo has 20+ releases of “major” features since the last time I was writing, and another 20ish release since I started using it 2 years ago. Each one has introduced new features and functionality that I have no idea about. Probably some very cool things that I need to look into, but for now… going to focus on sticking to the writing and less tinkering.