Different index for some categories


I’m pretty new to Hugo, and i’m trying to have different templates for my categories.

To sum it up, i have Category A, B, C and D.
For the moment, they use the template list.html in layouts/categories.

I would like to have a basic template, a template for C and a template for D ( still a listing template ).

Is it possible and how ?

Also, i would like to do some translation using these templates ( i have a folder for my 2 language in content ). Is is possible to have something like slug.md or _index.md for a category list page ?

Thank you !

AFAIK there’s no official why to have different templates for each category, but you can hack some stuff based on these 2 threads:


@sjardim Your second link has the answer. In Hugo, we can define different Taxonomies, such as Tags and Categories. Each of these can have their own layout files.

1 Like

Thanks, @brunoamaral! I was not sure because I did not have to implement this yet.

1 Like