Why would one wish to use `disableKinds`?

There are numerous features in Hugo that I read about and wonder, “What is the canonical use case for this?”…more than can be discussed in a single post. Today, I’m curious about the disableKinds config parameter.

Reading the docs, I think I understand how disableKinds works, but I’m unclear why I might want to use it. Does using it help with build performance? How is using this different than simply not including a certain kind, e.g., taxonomies, in a template?

The why would be because there are Kinds you might want to not have created.

Say you want a single page site, listing all your projects, but you don’t want single pages created for each project. So you might disableKinds all but the home kind. (See here for all the disable-able Kinds).

For another use case, see the first point here: Hugo Themes Dont's

4 Likes

I’m using hugo as a fancy markdown generator for a django app.

I know there are probably better solutions for this, but my site evolved from a static hugo site and it’s been faster for me to do this rather than rewrite everything.

To that end, I was able to disable everything I don’t need with one config.toml line:

disableKinds = ["taxonomy", "taxonomyTerm", "category", "sitemap", "RSS", "404", "robotsTXT", "home"]

I removed RSS, using ATOM and JSON feeds.
For my private page I also disabled the sitemap.