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. 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.
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.
have now moved off hitchens and using sumo as my base with severe css mods and a range of template changes on top.
Moving slowly and carefully and readying to move into some of the pages I have - noting that OTD, Replies and Archive are not behaving as they should. Could be me - so not asking for help - yet - BUT wondering if this was resolved - or if I am on Sumo - all moot?
One simple tactic to figure out if it’s a “you” problem or not is to temporarily switch to the Sumo theme and set your Custom Theme to None. If the problem goes away, you’ll know it’s probably something in your custom templates.
The archive page HTML is 13.8 MB, which is very, very, very, very, very big. It has close to 300,000 HTML elements and lots of resources (images etc.), which will take browsers a long time to download, parse and process. That’s probably why it isn’t behaving well.
Out of the box, Sumo should work with Hugo 0.158. I’m running it on one of my test blogs.
P.S. Just for fun, I took a look at the network traffic for the archive page and stoped measuring after it had made 8,342 requests and downloaded 3.2 GB of data.
Yes the archive page seems to be pulling the entire post for each entry know need to fix - mainly in css land at moment and focussed in index and single .. I will do as you suggest in the morrow … working this page by page.
Yes thankyou - prolly something I was experimenting with when you and I were last talking about redesigning my archive page - before I realised that I couldn’t really do what I wanted inside hosted Micro.Blog - and so I parked it. It seems to have become the default page when I moved across to Sumo. So I need to fix that - and will. The CSS focus is because I wanted to get index and single aligned with my vision … nearly there … and then I will move along page by page.
Single and Index are probably the only two pages that my follower uses and strong suspicion that the rest is just me futzing.