Open-source project
alex-shpak/hugo-book avatar
alex-shpak/hugo-book

alex-shpak/hugo-book: a Hugo documentation theme with zero default configuration

Hugo documentation theme as simple as plain book

4,093 stars1,311 forksHTMLMIT

At a glance

What is it?
Hugo Book is an MIT-licensed Hugo theme for documentation sites, built around a plain-book reading layout, CSS-first behavior, and a starter repository. It suits small docs projects that want Markdown and almost nothing else.
Who is it for?
Adopt Hugo Book if you have a Markdown documentation set and a Hugo v0.158 or newer binary, and you want the theme's defaults rather than a design system you rebuild. Do not adopt it if you need stability across upgrades, since the README states breaking changes are expected between releases, or if your site depends on JavaScript for navigation, since primary features work without it.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 7 days ago.
What is it written in?
Mainly HTML, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 25, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What Hugo Book is for, and who it is not for

Hugo Book is a theme for Hugo, the static site generator, aimed at people who already write documentation in Markdown and want it rendered as something that reads like a book: a sidebar, a reading column, and shortcodes for the occasional structured element. The README lists the intended shape of the project: clean simple design, mobile-friendly, multi-language support, comments support, a simple blog and taxonomy, dark mode, and primary features working without JavaScript.

The audience is narrow on purpose. If you are building a marketing site with custom sections, animated components and a design system, this theme is the wrong starting point. Its stated primary goals include keeping it simple, keeping minimal or zero default configuration, avoiding interference with user-defined layouts, and avoiding JavaScript where CSS can do the job. Those goals are constraints on what the theme will ever do. A project that needs a component library, a search UI built in JavaScript, or per-page bespoke layouts will spend its time fighting the defaults rather than using them.

It fits best when the documentation is the product: a handful of authors, a directory of Markdown files, and a requirement that the site builds to static HTML with little maintenance.

How the theme is put together: Hugo modules, layouts and assets

Hugo Book ships as a Hugo theme with a conventional repository layout. The top level contains layouts/, assets/, static/, i18n/, archetypes/, an exampleSite/ directory, a theme.toml, a hugo.toml, and a go.mod. That go.mod declares the module path github.com/alex-shpak/hugo-book and a Go version, which is how Hugo's module system consumes the theme without a git submodule.

The exampleSite directory is the documentation. The README states the example site is self-documenting at book.alxs.dev, so the reference for shortcodes, configuration and content structure lives inside the repository rather than in a separate manual. That is a deliberate choice and a real one: you read the theme by reading a site built with the theme.

The i18n directory holds translation strings, which is what backs the multi-language claim. The assets directory holds files processed by Hugo's asset pipeline, and static/ holds files copied through untouched. Because the README says primary features work without JavaScript, the navigation, sidebar and dark mode are implemented so that the site remains usable with scripting disabled, with JavaScript reserved for enhancements rather than core reading.

One structural consequence is worth naming. The theme declares breaking changes are expected between releases, and the README explains the versioning switch from simple v1 to v11 numbering to the minor SemVer scheme (v0.13.0, v0.14.0) for better Hugo modules support. A theme that changes between minor releases and is consumed as a Go module means your site build is coupled to the theme version you pin.

Installing Hugo Book from the starter repository

The README does not give a from-scratch install. It points at the starter repository at github.com/alex-shpak/hugo-book-starter and gives this sequence, which clones the starter into a directory named my-docs, pulls the theme submodule, and starts the development server with minification enabled.

bash
git clone https://github.com/alex-shpak/hugo-book-starter my-docs
cd my-docs
git submodule update --init --remote
hugo server --minify

After the last command, Hugo prints a local server address and serves the site with live reload. The --minify flag tells Hugo to minify the generated output, which is how the starter is configured to run during development in the README's example.

The requirement to check before any of this is the Hugo version. The README states Hugo v0.158 or higher, and the badge at the top of the README names hugo-0.158. An older binary will fail or behave unexpectedly, and the theme does not document a fallback for older Hugo. If you already have a Hugo site, the equivalent step is to add the theme as a Hugo module rather than cloning the starter, since the repository carries a go.mod for exactly that purpose; the README does not walk through the module configuration, so the exampleSite's own hugo.toml is the file to read for the keys the theme expects.

Upgrade cost: released versions versus the main branch

The README is unusually direct about maintenance. It says breaking changes are expected between releases, and it presents two strategies. Use one of the released versions if you want lower maintenance. Use the main branch if you want to live on the bleeding edge, updating your website when needed; main is also the default branch.

That is a real trade-off, not a marketing line. Pinning a release means you take upgrades deliberately and read the release notes first. Tracking main means you get fixes and changes as they land, and you accept that a pull of the theme can break your build. There is no third option described in the README, such as a long-term support branch.

The release history shows the cadence: v0.15.0 on 2026-09-04, v0.14.0 on 2026-05-22, and v13 on 2025-10-19. The gap between v13 and v0.14.0 is roughly seven months, which is consistent with the README's note that the numbering scheme changed; the v0.14.0 and v0.15.0 releases are about three and a half months apart. The last push to the repository was on 2026-09-22, one day before the v0.15.0 release window closed, so the main branch is where current work lands.

For a documentation site that changes rarely, pinning a release and upgrading on your own schedule costs almost nothing. For a site with many contributors and a need for the newest shortcodes, main is the honest choice, with the understanding that the README does not document rollback or a compatibility matrix.

Where Hugo Book stops being the right tool

The clearest limitation is the versioning policy. A theme that expects breaking changes between minor releases is not a stable dependency in the way a library with a compatibility promise is. If your documentation site is part of a release process with its own change control, every theme upgrade is a build you have to verify, and the README does not describe a deprecation window or a migration guide.

The second limitation follows from the design goals. Avoiding JavaScript where CSS suffices and avoiding interference with user-defined layouts means the theme will not grow into a full application framework. Client-side search, interactive API explorers, and versioned documentation switchers are not in the feature list. The README lists comments support and a simple blog and taxonomy, which is the extent of the dynamic surface it advertises.

The third is documentation placement. Because the example site is the documentation, the fastest way to learn the theme is to read its source, and the README itself is short. Someone who wants a written configuration reference with every key explained will not find it in the README; they will find it by reading exampleSite. That is efficient for an experienced Hugo user and slow for a newcomer who has not used Hugo modules or shortcodes before.

Hugo Book against a general-purpose Hugo theme

The obvious alternative is a general-purpose Hugo theme built for content sites, such as one of the many themes that ship a blog, landing pages, and a documentation section in one package. The difference in approach is scope. A general-purpose theme starts from a design system with many page types and asks you to configure which ones you use. Hugo Book starts from a reading layout and asks you to add only what documentation needs.

That shows up in the configuration surface. Hugo Book advertises zero initial configuration, and its stated goals include keeping minimal or zero default configuration and avoiding interference with user-defined layouts. A general-purpose theme typically ships a large config with menus, hero sections, and widget toggles. The practical consequence: with Hugo Book, the first hour is spent writing Markdown; with a broader theme, the first hour is often spent disabling parts you do not want.

The cost is flexibility you may later miss. If the documentation grows into a product site with a landing page and a pricing section, Hugo Book gives you no components for that, and you either add layouts yourself or move. The README's goal of avoiding interference with user-defined layouts means adding your own layouts is anticipated, but you are writing them, not configuring them.

Editorial conclusion

Adopt Hugo Book if you have a Markdown documentation set and a Hugo v0.158 or newer binary, and you want the theme's defaults rather than a design system you rebuild. Do not adopt it if you need stability across upgrades, since the README states breaking changes are expected between releases, or if your site depends on JavaScript for navigation, since primary features work without it. Before committing, verify that your Hugo version satisfies the requirement, decide between a released version and the main branch, and confirm the starter repository still resolves its submodule with git submodule update --init --remote.

Frequently asked questions

What Hugo version does Hugo Book require?

The README states Hugo v0.158 or higher, and the badge at the top of the README names hugo-0.158. An older Hugo binary is outside the documented requirement.

How do I install Hugo Book?

The README points to the starter repository at github.com/alex-shpak/hugo-book-starter and gives four commands: clone it, enter the directory, run git submodule update --init --remote, then hugo server --minify. The repository also carries a go.mod, which is what Hugo modules consume.

Does Hugo Book need JavaScript to work?

The README lists primary features working without JavaScript as a feature, and the contributing goals say to avoid using JS if it can be solved by CSS. Scripting is not required for the main reading experience.

Should I use a released version of Hugo Book or the main branch?

The README says to use one of the released versions if you want lower maintenance, and the main branch if you want to live on the bleeding edge of changes. It also states breaking changes are expected between releases, so the choice is between stability and currency.

Where is the Hugo Book documentation?

The README states the example site is self-documenting at book.alxs.dev, and the repository contains an exampleSite directory. There is no separate manual in the README itself.

Official sources

  1. alex-shpak/hugo-book on GitHub
  2. License: MIT
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/alex-shpak-hugo-book.svg)](https://hysenlabs.com/projects/alex-shpak-hugo-book)