Skip to content

Hugo

A single Go binary that turns Markdown and templates into the site you are reading.

Homebrew formula Direct download

What it does

Hugo reads content/, applies Go templates from the theme, and writes a static public/ directory. Builds are fast enough that hugo server with live reload is the normal authoring loop.

The extended edition — which Homebrew installs — adds the embedded LibSass compiler and WebP support. Many themes require it, and a site that needs it fails outright on the plain edition rather than degrading.

Themes as modules

Hugo can resolve a theme through Hugo Modules — Go’s module system — rather than vendoring it or adding a submodule. The theme is declared in go.mod, downloaded into Hugo’s module cache, and upgraded with one command, so there is no themes/ directory to keep in sync. That requires Go to be installed.

Notes

  • hugo server -D -F is the authoring loop: drafts, future-dated content and live reload. Drop the flags to see what would actually publish.
  • enableGitInfo: true makes the build hard-require a real Git repository — a shallow clone produces wrong dates, and no repository at all aborts the build.

Alternative to

AlternativeTypeTrade-off
EleventyOpen sourceAs flexible, JavaScript-based, far smaller ecosystem of themes
AstroOpen sourceComponent-driven, better when the site needs real interactivity
JekyllOpen sourceThe original, and what GitHub Pages builds natively
ZolaOpen sourceA single Rust binary with the same no-dependencies appeal
MkDocs Material or DocusaurusOpen sourceDocumentation-specific, batteries included

Install

brew install hugo

Links

This post is licensed under CC BY 4.0 by the author.
Last updated on