Article · · 1 minutes to read · Jacob Barnes
I use Hugo to run my blog. I was having some issues where I could not disable the “Categories” and “Tags” pages that are generated automatically.
I eventually solved the issue by adding these lines to my config.toml:
disableKinds = ["taxonomy", "term", "taxonomyTerm"]
[taxonomies]
category = "categories"
tag = "tags"
Make sure that disableKinds
is at the bottom of the primary configuration lines at the top. Hugo gets confused when section-less configuration attributes are mixed in with other configuration sections.
Example:
title = 'Your Blog'
theme = "my-amazing-theme"
# New Config Line
disableKinds = ["taxonomy", "term", "taxonomyTerm"]
# Config sections
[taxonomies]
category = "categories"
tag = "tags"
I noticed that this issue primarily appears on Linux-based installations, but Windows-based installations still work correctly with term
(as of 11/06/22).
Eventually I discovered that my issue was that the taxonomyTerm
kind was missing in disableKinds
. By adding that, it fixed my issue.
According to GitHub, the term
kind was deprecated and replaced with taxonomyTerm
in June 2020, but the documentation was never updated. View the commit here.