Sam Hooke

These are rough notes from whatever I was working on, interested in or thinking about at the time. They vary greatly in quality and length, but prove useful to me, and hopefully to you too!

Hugo tag and category pages

Taxonomies are ways of grouping content within hugo. By default, hugo defines two taxonomies: “tags” and “categories”. You can then, for example, write a post and define tags = ["test"] in the front matter. Hugo will then generate a taxonomy list page at and you can view all posts with the "test" tag at

Note that in all this “tags” is plural. For this website, I wanted the taxonomy list page to be singular. It turns out this is rather easy!

To use singular rather than plural, override the default values for the tags and categories taxonomies:

# Use singular rather than plural for default taxonomies
tag = "tag"
category = "category"

As shown above, the [taxonomies] section of the config file defines a list of key/value pairs, where the key is the singular term, and the value is the plural term. Hugo uses the plural term of the taxonomy for the list page URL, so by making this singlar we get the URL we desire.

You can then go to to view the list of tags.


In order to customise things further, you can modify the templates used:

  • layouts/_default/terms.html is the template for, which lists all the terms for that tag.
  • layouts/_default/taxonomy.html is the template for, which lists all the pages for that term.

The hugo documentation has a good starting point for writing your own taxonomy templates.

Disabling taxonomies

To disable the default taxonomies entirely, simply set their values to empty strings.

# Disable the default taxonomies
tag = ""
category = ""
<< Previous: Calling C from Python
Next: Calling MPSSE over FTDI from Python on CentOS 7 >>