Adding Hugo 0.158

Hello theme developers and tinkerers! I have added Hugo 0.158 as a new version available on the Design page. I’ve been testing with my own blog and I’m pretty happy with the results so far.

There are a couple of new things to be aware of.

When running with 0.158, Micro.blog has a brand new, optimized rendering flow. When you make a new post, Micro.blog will run Hugo with a special “segment” of content, essentially updating the home page, feeds, and your new post first before updating the rest of the site. For sites with tens of thousands of posts, this is a dramatic performance improvement.

There are the usual Hugo deprecations and changes, as Hugo developers love to do. :slightly_smiling_face: The one that bit me at first is that .Site.Author should now be .Site.Params.author. Micro.blog will automatically rewrite your layout files if they haven’t been updated yet, so no change is required right away. Moving forward, theme developers should prefer the new format .Site.Params.author.

If anyone runs into other problems, please let me know. For some things, there may not be a work-around other than editing older templates.

Hugo 0.91 remains the default for new users for now. I plan to switch the default to 0.158 in the future, though.

1 Like

all seemed swell - we will see - though i notice that some of my css controls arent quite what they used to be - but I can fix that - I dont instantly see any big problem on the site - BUT - in the micro blog dashboard I got this warning:

Theme error: ERROR error building site: “layouts/_default/baseof.html:13:1”: apply base template failed: template: archive.html:13: function “reverse” not defined

I am using hitchens

and chatting to Claude - it might be an error bigger than this bear wants to attempt to fix?

Thanks for reporting this. It looks like Hugo did subtly change how reverse can be called. We’ll have to dig into this more. I’m not actually seeing the archive.html template in the Hitchens theme, though, so it might be a plug-in that needs to be updated.