As I’ve pointed out a few times Hugo powers this site. In this post I’m going to try to point out some pros and cons, so let’s get into it.
To paraphrase Douglas Adams:
“The static site generator landscape is big. Really big. You just won’t believe how vastly hugely mindbogglingly big it is. I mean you may think it’s daunting choosing a web framework, but that’s just peanuts to the static site generator landscape.”
A list of static site generators can be found at staticsitegenerators.net. That’s quite a lot to choose from. Personally I have experience with Middleman and Hugo, so that will be my frame of reference. Here are my personal pros and cons concerning Hugo, from a beginners’ perspective:
Pros #
- Hugo is fast. I mean really, really fast. Stupid fast. Run Forrest Run fast.
- Easy to set up (well, compared to Middleman at least). No Ruby or Node versioning issues to contend with, just install the Hugo binary, and you’re good to go.
- Hugo can talk to data feeds nicely. It’s data driven content features make it a piece of cake to generate HTML based on json/csv feeds.
- Pagination is easy to implement
- Writing your own
helpersshortcodes is dead easy - Decent support for traversing local files
- Helpful community
- Good documentation
- Front Matter & Taxonomies provide an easy way to handle content metadata
- Handy tools to migrate from other platforms
- Loads of free themes that work out of the box (GridSide used to power this site)
- An easy to learn template language
Cons #
- Multilingual isn’t quite supported yet out of the box and is fidgety to set up
- No XML support for data feeds. Only JSON/CSV.
- Asset management/compilation isn’t built in and is a pain in the ass to set up. At the time of writing there’s Huggle & Hugulp. They both have their pros and cons and try to solve the asset problem admirably but still feel clunky as they’re not part of Hugo. Middleman is much more flexible and feature rich in this regard.
I haven’t really got much more to say on the matter. If you want a static site generator that’s fast and just works you could do much worse than Hugo. As always, I look forward to reading your opinions in the comments below.