Associate a description with a tag

Is there a way to associate a description with a specific tag? Basically, on the tag list page, I want to show the tag name and tag description.

I saw this post:

which does it by creating a template for each tag,and adding the description to the template, but I am trying to figure out if there is a central place (config?) I could define the data so I could use a single template, and not create a new template every time I add a tag.

I could probably also use a single template, and then write code to show description based on tag, but again, I was looking for a simpler solution to maintain.

content directory

├── posts/
│   ├──
│   └──
├── tags/
│   └── tag-a/
│       └──


title = 'Tag A'
date = 2024-06-01T09:29:49-07:00
draft = false
This is the description of Tag A.

layouts directory

└── _default/
    ├── baseof.html
    ├── home.html
    ├── list.html
    ├── single.html
    ├── taxonomy.html
    └── term.html


{{ define "main" }}
  <h1>{{ .Title }}</h1>
  {{ .Content }}
  {{ range .Pages }}
    <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
    {{ with .Content }}
      {{ . }}
    {{ end }}
  {{ end }}
{{ end }}

ok. Just to make sure im reading this right, I need to create a page for each tag.

If you want a description specific to a given tag, then you need to create a page for that tag.

Thank you for confirming.

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