Content

Tags Page: content/tags.md

How tags work in GAX Pro. Covers the tags controller, tag frontmatter in articles, tag list page, and tag detail pages.

Tags Page: content/tags.md

What Tags Do

Tags group articles by topic. A tag can be anything: golang, seo, hugo, deployment. When you add a tag to an article, GAX creates a tag page that lists every article with that tag.

Tags are useful for:

  • Grouping blog articles by topic
  • Grouping services by category
  • Grouping projects by stack
  • Helping readers find related content

The Tags Controller

The tags page is defined by:


content/tags.md

It uses layout: tags-list and does not need a collection or pagination field. Tags are generated automatically from article frontmatter.


---
title: "Tags — GAX Pro"
description: "Browse GAX Pro articles by tag: Go static sites, themes, SEO, Hugo migration."
layout: tags-list
canonical: "https://gaxpro.axcora.com/tags/"
---

This page renders a list of all tags used across the site. Each tag links to its own page.

Adding Tags to Articles

Tags are defined in the article frontmatter:


---
layout: post
title: "What Is GAX?"
tags:
  - golang
  - ssg
  - go-static-site-generator
---

Or as an inline list:


tags: [golang, ssg, go-static-site-generator]

Both formats work. The list format is more readable for long tag lists.

Use lowercase tags with hyphens for multi-word tags:


tags:
  - static-site
  - seo
  - hugo-alternative

How Tag Pages Are Generated

When an article has tags, GAX creates:

  • A tag list page at /tags/ — lists all tags used on the site
  • A tag detail page for each tag at /tags/[tag]/ — lists all articles with that tag

For example, an article with tags: [golang, seo] creates:

  • /tags/golang/ — all articles tagged golang
  • /tags/seo/ — all articles tagged seo

The tag pages use templates/layouts/tag.gax and templates/layouts/tags-list.gax.

Tag Page Variables

In the tag detail template, these variables are available:

Variable What It Is
tag The current tag name
posts Articles with this tag
all_tags All tags on the site

These are used in templates/layouts/tag.gax to render the tag page.

How Tags Appear in Articles

The article layout shows tags as clickable links at the bottom of the article:


golang
seo

Clicking a tag goes to the tag detail page, which lists all articles with that tag.

Choosing Good Tags

Tags work best when they are:

  • Consistent — use the same tag for the same topic across articles
  • Specific — go-static-site-generator is more useful than go
  • Limited — 3–5 tags per article is usually enough
  • Lowercase — golang, not Golang or GOLANG

Too many tags dilute their value. Too few leave articles hard to find.

Adding a New Tag

To add a new tag, add it to an article frontmatter:


tags:
  - golang
  - new-tag

Save the file and rebuild. The tag appears in the tag list and gets its own page automatically.

Removing a Tag

To remove a tag, delete it from all articles that use it. When no article uses a tag, the tag page disappears on the next build.

Common Errors

Tag page shows 404 — the tag is not used in any article, or the tag name has uppercase letters or spaces.

Tag does not appear in the list — the tag is not formatted correctly in frontmatter. Check that it is a YAML list.

Tag link is broken — the tag name has uppercase letters or special characters. Use lowercase and hyphens.

Tag list is empty — no article has tags. Add tags to at least one article.

Build fails — YAML syntax error in a tag list. Check indentation.

Next Step

The tags page is set. All documentation pages are now covered.

If you want to edit content in a browser, continue to:

If you want to configure the site further:

Need Help?

  • Contact us — if a tag page does not render correctly