Creating costum taxonomy template


#1

Hello,

Im trying to create a taxonomy page for the content in blog section.

  • i am kind of confused to where i should create the tags folder in the content folder, should i create it in the blog section of mu hugo website?

  • and where should create the templates in order to create a costum taxonomy template? should i create a taxonomy folder in the layouts or ?

this my the repository of my website

Your help or insights are very welcomed


#2

The beauty of taxonomies is that you don’t create its content manually; they are derived from the content front-matter.

You may choose to add some content and front-matter to the taxonomyTerm pages (example.com/tags/) or taxonomy pages (example.com/tags/my-tag/) using _index.md, but that’s a different topic.

So, in general, you don’t create any tags folder in the content directory.

Have you gone through the Taxonomies doc:

There are many examples for that for both taxonomyTerm and taxonomy Kind pages:


It’s useful to understand the Page Kinds for taxonomy templating.


#3

thank you for the answer i have already read all of the information you have posted.

but how do you create a template for displaying the taxonomies ? do you create a taxonomie section in the layout folder, and then create a list.html page within that folder ?


#4

nevermind i think i found a way to solve my problem


#5

I wish this topic do some help to you.

Tag Cloud


#6

Perhaps this helps. I wrote this down when I tested Hugo’s Template Lookup Order. You’ll find some possibilities to select exactly the template you want for a certain page.

Hope this helps.