the avatar image of Benjamin Bouvier

Updating the blog to Zola 0.23


This article is part of a series: le blog. Other articles in the series include:

  1. A new blog theme!
  2. Publish a Zola blog with Gitlab CI, real fast
  3. I've switched blog engines and now every post has 100 million valid URLs
  4. Tiny new blog features
  5. Piggybacking on Mastodon, email newsletters edition
  6. Fixing Sveltia CMS auth on Forgejo + Anubis
  7. Updating the blog to Zola 0.23 (👈 you are here)

It’s been more than a month that the blog wasn’t mentioned in a blog post. Let’s fix that.

This website is proudly powered by Zola, the Rust blog templating engine. I’m pretty satisfied by it, as it can compile my entire blog in less than half-a-second on all my machines, including the blog’s CI.

A new 0.23 version has been released as of August 5th of this month. The changelog nicely documents what changes were needed. In particular, as part of the migration to the version 2 of the Tera templating engine, the concepts of shortcodes and macros have been unified into a single one called components, and I found it a nice simplification, in terms of learning how to use it. Changes to the theme I’m using and maintaining, sonj, were pretty mechanical.

There’s been only one surprising change that took me a bit of time to resolve: the date library used by Tera has changed under the hood, and the new one didn’t support the %+ format used throughout the sonj theme. It turns out that this specific format, inherited from the strftime C function, would render a date as a ISO8601 string, like e.g. 2026-08-18T00:00:00+00:00, as in the return value of the date --iso-8601=seconds command. But this format has never been quite properly defined apparently, and it’s not supported everywhere, so the jiff time Rust library explicitly doesn’t support it.

A migration path is to create a custom format string that’s verbose but equivalent:

%Y-%m-%dT%H:%M:%S+00:00

I haven’t included a time zone information in the date, because I didn’t find it relevant; your mileage may vary. I’ve also mentioned this migration path in an issue on the Tera repository, so that the changelog notes can be updated accordingly hopefully, and it can help others.

Anyways, here’s to me finding excuses to write on my blog 🥳



Comments

If this article inspires you, feel free to send me an email in response.