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 website.com/tags you will find all tags you used in your website what i want is to remove that page but keep website.com/tags/dev
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
Docs: https://gohugo.io/content-management/taxonomies/#default-taxonomies
If you also wanted to disable /tags/lorem/
you can add "term"
to the list of disableKinds
.
3 Likes
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.