Hugo in Action teaches you to build and host your own fully customizable static website with the Hugo engine. This friendly tutorial teaches you step-by-step how to use Hugo as a Content Management System and web development environment. Working with a complete company example website and source code, you’ll get to grips with using Markup for content tagging, moving off-template to build your own Hugo themes, and creating custom pages. Next, you’ll push further than you thought was possible with a static site, using JavaScript and the JAM Stack (JavaScript, APIs, and Markup) to add functionality like eCommerce and your own APIs. When you’re done, you’ll have the skills to build a stable but feature-rich website without relying on third-party server code.
Fool’s gold. I read the entire book and am no more capable of building a simple Hugo site I envisioned when I started. The book has a way of explaining and teaching a lot about Jamstack and various snippets and features without actually empowering me to build a site. That start-from-scratch-level creativity, that build-it mentality are missing.
I can understand how everything works perfectly based off the text, and still be perfectly incapable of building a full site according to my design spec and imagination. I find it hard to even tweak another theme from Hugo's official gallery without understanding its quirks and inner workings.
To be fair, this inaccessibility is more a problem of the Hugo template engine and maintainers than this book. The core difficulty of Hugo is how widespread the generative code becomes, with logic sprinkled throughout a project directory in seemingly random places like index.html, _index.html, public folder, layouts, subfolder ptmpl files, imported modules, node packages, downsized copies of images, and that ever-annoying "front matter" toml, yaml, and json.
But after reading this book, I still don't know why they call it "front matter." This book throws around the term like it's common knowledge, but they should actually state the filename instead of using a generic term like front matter. Is it hugo.toml? config.yaml? Header metadata? It's never clear because the basics are never explained.
The book would have been better served building up a full-featured website that is more visually appealing from the start, then deep-diving multiple themes from the hugo gallery, such as toha, gallery, ananke, or any others that have multiple complicated moving parts but would make better sense when built up brick by brick, component by component. Otherwise, the gap between the boring basic themes introduced in this book, and what anybody wants to build to appeal to the general public, is too great. The lessons you learn from building up the basic Acme Theme in this book do not translate to understanding or modifying the best themes you find in Hugo's themes gallery at . The book should deep-dive more of those themes and address how a user would modify, customize, or extend each of those. Then the book should teach us how to build our own equally complex and appealing theme from scratch. Acme and Eclectic may be teachable, but they're so unappealing and so far from what people are building on the cutting edge that they're not even worth the time investment it takes to follow the stages in this book. It's like spending 300 pages discussing how to do the hopscotch when kids just a year older are driving go-karts. You can finish this book and still have no idea why that theme on Hugo’s gallery mysteriously breaks in a SASS inconsistency, or why you keep finding minified HUGO logos and cruft in your public directory after building.
I follow every chapter and exercise step by step, but when it comes to swap in my own images, they don’t match the background color or framing. Then what? How to change a simple color? Language of text? Font? None of this is covered.
Instead, the content focuses too much on features, not on design. Add items on the site to my cart like an online store? Nobody will buy your stuff if you can’t tweak the page’s appearance, design, placement. No discussion of how to make incremental improvements or add custom elements. No explaining how a complicated theme works. Too much on the technical side, with diagrams of folders that don't elucidate where a site comes from, what code is executed, and what logic in which files we should manually modify to change the website's appearance. The confusing part about Hugo is the decentralization of the code, making it hard to debug and track a site's logic or layout, not adding Go or Shopify functionality. The topics covered in this text are mostly useless knowledge like directory hierarchy and edge features, with not nearly enough on design and layout.
Not enough on adding your own custom elements, like favicon, images, color palettes, and where to find top-level landing page code to modify. In fact, the book states that landing page index.html logistics vary highly between themes, making it hard to generalize. Then show us how to do it for multiple themes, instead of waving it away as an exercise for the reader! Landing page logic is the most important part of a website! It's the first step to building anything of value.
There are not enough walkthroughs on themes with tons of dependencies. Many of examples are older versions, resulting in build errors when running hugo server -D, such as scss missing here, sass missing there, random piecemeal library dependencies requiring an npm update and then not syncing well with the theme, so you have to debug the theme.
With other languages and frameworks like HTML or CSS or Swift, Googling gets you documentation, stackoverflow and qiita articles, and GitHub gists. With Hugo, you find a bunch of Hugo forum posts full of snark, with Hugo fanatics talking down users with a condescending tone, such as reminders from bep that he does this on his own volunteer time, or jmooring reminding users to follow etiquette, or nekr0z asking for code and "show us your effort" before offering help (“We can only make wild guesses� ... “We contribute to documentation on our own free time. And what did you contribute to documentation exactly?� ... “See this rulebook for how to post questions�), prematurely closed and inactive threads, and people with the same questions being asked to post their repo or code. If you need to see code to debug a problem, your framework has a problem!
And this book does nothing to help solve that core problem. A recipe book featuring how to extend or tweak various themes would have been more helpful.
No wonder there aren’t many books written on Hugo. It simply changes too quickly, breaking old code too readily, with too little empathy from its maintainers.
Hard pass: avoid Hugo (and this book) like the plague!
I quit halfway through the book and it has been a frustrating experience.
I am never going to buy a MEAP (Manning Early Access Program) book again! You feel privileged because you get early access. The only thing I felt was frustration because I got access to an unfinished product.
What was so frustrating about this book, given that v13 is pretty much the final draft?
- Insufficient information: I had to look up external sources to get the site up and running on GitHub Pages. - Copy/Paste errors: Asking you to change the code but in the wrong file. - Markup errors: sometimes you need to see the code and sometimes the result. Sometimes it got mixed up in the book and you saw markdown code or html-code, when you should have seen the result and vice versa. - The explanations are minimal, mostly just instructions. - In order to study this book I had this book open on my iPad and on my Mac I needed 4 apps open: a Finder window for access to the code samples, VS Code, a Terminal, and a browser window with at least 5 tabs (Google to look stuff up, GoHugo for extra/better information, the site running on localhost, an example site of the author on GitHub Pages, the repository of the current chapter on GitHub) - Instead of starting to learn Hugo with a very basic theme, in this book you start with a complex theme that has features not found in most themes. - ... I am going to leave it at that.
Last year, I fell in love with Hugo thanks to the expertly written "Build Websites with Hugo" by Brian P. Hogan. The only emotion I have felt while reading "Hugo in Action" was frustration.
Why am I still giving it 2 stars. Well, it is still an unfinished product, maybe the final version will be better. It covers more ground than "Build Websites with Hugo", so I might use this book as a reference manual to look up what else is possible.