Use tags as taxonomy AND content

Hi folks,

What I’m trying to do

I’m creating a blog, where each post can have multiple tags. Each of these tags will have a matching page containing:

  • The name of the tag (title)
  • A short description of the tag
  • A list of all posts using this tag

What I got so far


├─ content
|   ├─ posts
|   |  └─
|   └─ tags
|      ├─
|      └─
├─ layouts
|   └─ tags
|      ├─
|      └─

tags = ["Cooking"]

title = "Cooking"
description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam rutrum lectus libero, sit amet aliquam odio lobortis non. Morbi egestas at augue eu aliquet. " 


When looping though the .Pages object, I got both the cooking content entry, and the cooking tag from the post:

Page(/tags/cooking) Cooking


On this page, I don’t have access to the .Description because this is not the tag content entry, but the tag entry from the post.

There is some default Hugo behavior here, and I’m not sure of how to handle it.
Is is doable?

I think what you need to do is create these files


In the content of the files is what you’ve currently got in your named Markdown front matter.


1 Like

It’s working, thanks!

But this blog will be managed via Forestry (by a non technical person), and it will create /content/tags/ files… There is no way to keep the structure?

With Forestry, might be better ask in their Slack channel. You could also look at NetlifyCMS, though I doubt it’s any better at solving this problem,.

I do this type of thing on my Tags page ( and have had to create a (for example) /tags/cooking/ for each tag that has a description. I think the problem is that each tag page, e.g. Cooking, is a list page and in Hugo you specify content for a list page with a file named[*] I’ve wondered if there is a way to specify all tag descriptions in a data file, e.g.:

cooking: cooking description
climbing: climbing description
tag: tag description

and avoid creating all those tag files. Would that be helpful to you? If so, maybe someone will help us figure out how to do that. I think it would not be hard, but I have not yet used Hugo data files.

[*] Or _index.mmark, _index.adoc, etc.

Thanks for your answers. I will stick to the / solution for now. Forestry is planning to add the support for this structure in their roadmap.