Avoid creating `tags` and `categories` directories

Hugo creates two directories—tags and categories—with index.html and index.xml in them. Could someone please tell me how I can avoid these directories?


tags and categories are taxonomies. You can disable these by setting disableKinds in your config.toml as described in the docs here: https://gohugo.io/content-management/taxonomies#default-taxonomies

:frowning: Still generates the categories/index.html and tags/index.html pages!

Works for me

Please show your code so that we can try and help.

Should have done it earlier. Sorry. Here’s the contents of config.toml

title = "Testing"

    description = """Learning Hugo"""
    favicon = "favicon.ico"

languageCode                = "en-us"
DefaultContentLanguage      = "en"
disableKinds                = ["taxonomy", "taxonomyTerm"]

    plainIDAnchors  = true
    hrefTargetBlank = true
    noreferrerLinks = true

You need to move these above the [params] block.

Edited to add:

Technically, you only need to move disableKinds to above the [params] block to fix your current issue, but the other two keys are top-level keys as well (i.e., should not be under [params]).


Works! Thanks so much!