How to remove the pages that list all categories and tags

hello in hugo when we enable taxonomies ( tags and categories ) two pages get generated by default and this two pages list all the tags example if you visited you will find all tags you used in your website what i want is to remove that page but keep

It is not possible to disable list pages for tags or categories (yet). You could run a script after hugo that removes /public/tags/index.html and /public/categories/index.html. It always makes sense to have an additional shell script for the “dirty-works” after hugo is done creating the site.

1 Like

You can, in fact, disable this by configuring disableKinds:

disableKinds = ["taxonomy"]
ignoreErrors = ["error-disable-taxonomy"] # you will get a console error message without this


If you also wanted to disable /tags/lorem/ you can add "term" to the list of disableKinds.


@pointyfar Doesn’t disableKinds result in /tags/dev not being created?

No, disableKinds = ["term"] is what does that.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.