Hugo tutorials

Hugo logo

All Hugo tutorials are listed below. They discuss all kinds of features that this modern static website generator has. The chapters give in-depth content and recipes deal with practical Q&A-like situations.

Hugo recipes

Hugo recipes contain practical solutions ready to use with your static website. Their Q&A format describes a specific situation and then jumps to a verified solution, followed by a discussion to get a deeper understanding of the topic.

Part I. Meet Hugo

Hugo CLI

icon In the recipes below we examine Hugo’s command line interface (CLI), like the hugo command for building our static website and hugo server for serving it.

List content files

Manage content with the CLI

Back to table of contents ↑

Hugo terminology

icon In these recipes we clarify Hugo’s terminology as well as the Hugo features that are behind those (sometimes abstract) terms.

Back to table of contents ↑

Configure Hugo

icon The recipes below look at different ways to configure Hugo, ranging from the configuration variables to the hugo command flags.

Introduction

Hugo configuration settings

Back to table of contents ↑

Hugo errors

icon Recipes in this category discuss the different error messages that can happen when working with Hugo, and ideas for how to fix them.

General errors

Theme errors

Back to table of contents ↑

Part II. Work with Hugo

Render pages

icon These recipes look at different ways to specify how Hugo should render its content. With configuration variables we can define which kind of content Hugo has to render, and it’s also possible to generate custom output.

Build unpublished content files

Disable Hugo pages

Back to table of contents ↑

Hugo functions

icon The recipes in this category explore the behaviour and feature of different Hugo functions. Topics include reading image dimensions, processing strings of text, and triggering Hugo error messages.

General functions

String functions

Back to table of contents ↑

Output content count

icon These recipes explore different ways to display how many pages Hugo generated. Examples include printing the total number of pages, counting blog posts, and outputting the length of categories and other taxonomies.

Back to table of contents ↑

Date and time

icon The recipes in this category discuss the different ways to work with time in Hugo, from performing time calculations to showing the relative age of content.

Relative age

Back to table of contents ↑

Strings

icon Recipes in this category look at different ways to work with Hugo text, with topics such as changing the casing of text and manipulating strings of text.

Text casing

Back to table of contents ↑

Part III. Style Hugo with themes

Understand themes

icon In the recipes of this category we look at how themes work in Hugo, what their features are, and how they affect our static website build.

Back to table of contents ↑

Theme template features

icon In this category of recipes we look at different theme template features that we can code in Hugo, like checking whether the website renders on localhost or not.

Back to table of contents ↑

Part IV. Beyond Hugo

Hugo and external tools

icon In these recipes we look at external services that we can use with our Hugo website, like Google Analytics and Google Tag Manager, but also a W3C Markup Validator.

General

Google Analytics

Back to table of contents ↑

Recipes hope to demystify a range of Hugo questions by breaking them down in small steps. Over time they create a library of possible Hugo questions. But they aren't intended as a definite reference: they simply show one particular approach. There are nearly always multiple and perhaps better (depending on your frame of reference and goal) ways to tackle a particular situation.

Meta

Recent Hugo content

icon The list below shows the most recent Hugo content, both new pages and the ones that are updated.

Recent Hugo recipes

Back to table of contents ↑

icon The most popular Hugo articles of the last 90 days are:

  1. Overview Hugo configuration variables
  2. Hugo's config.toml files made clear
  3. Google Analytics on live Hugo website
  4. Count all pages in a Hugo section
  5. Hugo website on localhost or not?
  6. Render draft content in Hugo
  7. Unable to locate Config - Hugo error
  8. Disable Hugo taxonomy list pages
  9. Hugo theme's config.toml file explained
  10. Google Tag Manager on live Hugo website
  11. Disable Hugo section pages
  12. Hugo's root/main directory explained
  13. Disable Hugo RSS feeds
  14. Unable locate template shortcode - Hugo error
  15. Disable Hugo sitemap file

Back to table of contents ↑