Learn Hugo With Build Websites With Hugo
I have been building sites with Hugo for years. I wrote my own theme, tuned my build pipeline, and deployed more static sites than I can count. But I rarely see a resource that captures the why behind Hugo as well as the how. Brian P. Hogan’s Build Websites With Hugo does exactly that.
Published by Pragmatic Bookshelf in 2020, this 154-page book is not a reference manual. It is a guided tour through building a real portfolio site from scratch. You install Hugo, create a theme, add projects and a blog, wire up data sources, and deploy the final result — all while learning Hugo’s mental model.

Build Websites With Hugo by Brian P. Hogan.
What Makes This Book Different
Most Hugo tutorials throw config snippets at you and call it a day. Hogan takes
the opposite approach. Every chapter builds on the last. You start with a blank
directory, run hugo new site, and by the end you have a live site with a blog,
RSS feed, JSON endpoint, search, and a deployment pipeline.
The book is split into eight chapters plus an appendix on migration:
- Kicking the Tires — Installing Hugo, scaffolding a site, creating content with archetypes, and understanding the output structure.
- Building a Basic Theme — Generating a theme, using
baseof.htmland partials, and styling with CSS. This chapter alone is worth the price. - Adding Content Sections — Creating a projects section with custom archetypes, list layouts, and section-specific templates.
- Working with Data — Pulling data from front matter, local files, and remote JSON sources. Rendering RSS and custom JSON output.
- Adding a Blog — Taxonomies, pagination, Disqus comments, and related content. Everything you need for a production blog.
- Adding Search to Your Site — Building a client-side search index using Hugo’s JSON output and wiring it up with JavaScript.
- Managing Assets with Pipes — Hugo Pipes for CSS/JS bundling, image processing, and integrating Webpack and npm.
- Deploying — Netlify, cloud storage (S3), and traditional web servers.
The structure mirrors how you would actually build a site. You never learn a feature in isolation — you learn it because your site needs it.
The Theme Chapter Is the Highlight
Chapter 2 alone justifies the book. Hogan walks through creating a theme by hand
— no cloning someone else’s repo, no fighting with a pre-built monster. You
create layouts/_default/baseof.html, extract partials for head, header,
and footer, and see exactly how Hugo assembles pages.
This is the chapter that made Hugo click for me when I first started. The baseof/block/partial model is Hugo’s superpower, but most tutorials gloss over it. Hogan lingers on it, and it pays off for every chapter that follows.
{{- partial "head.html" . -}} {{- partial "header.html" . -}} {{- block "main" .
}}{{ end }} {{- partial "footer.html" . -}}
Four lines that define the architecture of an entire site.
Data-Driven Content Without the Backend
Chapter 4 is where the book punches above its weight. Hogan shows how to pull data from:
- Front matter — per-page metadata rendered in templates
- Site config — global params accessed via
.Site.Params - Local data files — YAML/TOML/JSON in the
data/directory - Remote APIs — fetching JSON at build time with
getJSON
Then he flips it around and renders your content as JSON, creating an API from your static site. This is the pattern I use for this blog’s search index, and it is refreshing to see it explained so clearly.
Who Should Read This Book
This book is for developers who know HTML and CSS and want to build content sites without the overhead of a database or JavaScript framework. You do not need to know Go (Hugo’s templating language is its own thing), but you should be comfortable with a terminal and a text editor.
If you are already a Hugo power user, you might find the first few chapters slow. But the later material — custom output formats, Hugo Pipes, Webpack integration, and the migration appendix — has enough depth to make it worth the read.
What Is Missing
The book was published in 2020, and Hugo has evolved since then. Hugo Modules
(which replaced much of the theme copy-paste workflow) are not covered. The
image processing chapter uses the older .Resize and .Fill methods rather
than the newer .Process filter pipeline. And the deployment chapter leans
heavily on Netlify, which is fine, but other options like Cloudflare Pages or
self-hosted servers get less attention.
These are minor issues. The core concepts — templates, partials, content sections, data, and deployment — are unchanged and form the foundation of every Hugo site built today.
Final Verdict
Build Websites With Hugo is the best introductory book on Hugo I have read. It is concise (154 pages), practical (you build a real site), and well-paced (each chapter is a natural next step). Hogan writes the way good technical authors do: he explains the concept, shows the code, and gets out of your way.
If you are learning Hugo, start here. Skip the YouTube marathon and the copy-pasted config gists. Spend a weekend with this book and build something you own.
Build Websites With Hugo by Brian P. Hogan. Pragmatic Bookshelf, 2020. 154 pages. ISBN 978-1-68050-726-3. Available at pragprog.com.

