We moved our company website and blog from Middleman to Hugo in 2021, but I never posted about it here. I wrote a blog post about it at the time, and in retrospect it’s only gotten crazier that we used to get ~3.5 minute build times, and now are down to 15 seconds maximum on a slower server, or 3-7s on a faster one. Those are build times for 2586 pages on the whole website (including 240 paginator pages).
I think some of the issues you raised at the time might be outdated, but perhaps @jmooring can provide better advice Converting to Hugo | End Point Dev
Yeah, it’s interesting to read back on what I got stuck on 4 years ago. The issues I had with the documentation are certainly out of date, I’ve seen the docs improve immensely with more time and support. I’ll probably go in and add a 4-years-later update since those specific examples are no longer applicable.
I am still curious about whether you can view the entire context of a page for debugging purposes, similar to Zola’s __tera_context . Also about adding custom outputs on a per-taxonomy basis.
One place Zola wins over Hugo is the ability to easily print the entire context in a big JSON object. It’s a bit hard to navigate, but in my experience much easier and clearer than Hugo, where I have to either try using
printfto display the context’s variables, or search through the documentation. This was one of my favorite ways to quickly debug and learn about the inner workings of Zola, and would be very welcome in Hugo as well, without needing to know Go formatting width and the full shape of Hugo’s context object beforehand.
Enabling custom outputs on a per-taxonomy basis does not seem to be possible. We want to generate Atom feeds for our blog tags, but not for our blog authors, both of which are taxonomies. As far as I can tell, we have to enable them both and live with the cruft of unnecessary blog author feeds being generated.
Cascade the outputs front matter field down from the taxonomy page (e.g., content/tags/_index.md) or from your site configuration.
https://gohugo.io/configuration/cascade/
https://gohugo.io/content-management/front-matter/#cascade-1
You can use debug.Dump to see some things, but not everything. I understand the want, but I question the need.
Thanks for the feedback @jmooring, I updated the post with both these solutions, and to mention that Hugo has come a long way since 2021.
Hugo is almost stupidly fast. I’m in the process of migrating a blog from Middleman to Hugo, because it was taking me ten minutes or more to build on Middleman. I haven’t finished the conversion yet, but Hugo can build the approximately 7000 pages of the site in just over 10 seconds on an M3 MacBook Pro. Kudos to the Hugo team!