There has been a lot of activity around Micro.blog plug-ins lately, inspiring me to improve the theme and plug-in system. Under the hood Micro.blog uses Hugo to process blog templates, and we’ve been running an ancient version of Hugo. Having such an old version has held back some plug-in features, so today I started the process of migrating to the latest version of Hugo.
It’s a big jump, from version 0.54 released in 2019, to 0.91 released just a couple weeks ago. Some things are likely to break, so instead of updating everyone’s blog automatically and dealing with the fallout, we’re going to take it slow. The new version of Hugo is opt-in for now, under the Design screen:
Each blog on your account can use a different version, making it convenient to run Hugo 0.91 with a test blog while keeping your main blog as-is.
I don’t recommend updating unless you are working on a theme or plug-in that needs a specific feature from newer versions of Hugo. I’m testing all the built-in themes with the new Hugo and will keep updating them with tweaks until we’re happy that everything is running smoothly.
If you do try Hugo 0.91, I’ve already updated the Default and Marfa plug-ins — as well as some built-in Micro.blog templates — to work with the new version. You can install the latest versions of the plug-ins for those themes to get the latest versions, instead of waiting for Micro.blog to update.
The most common problem I noticed was using .Data.Pages
. That’s a quick fix to use .Site.Pages
instead so that it’s compatible with both versions.
I’ve also fixed some HTML escaping issues this week. Micro.blog is now smarter about not escaping special characters like “<” and “{{” when inside a code block.