Skip to Content

Tags

Tags are set in each blog post’s frontmatter (not on static pages under content/pages). The Minimal Blog theme turns every distinct tag into a listing page and links posts that share that tag.

Adding tags to a post

In content/posts/<your-folder>/index.mdx, use a YAML list under tags:

--- title: "Example post" date: 2026-03-19 tags: - Technical - Azure - Security ---
  • Omit tags entirely if the post should not belong to any tag.
  • A post can have multiple tags; it will appear on each tag’s page.
  • Use the same spelling and capitalisation every time. The theme groups posts by the exact tag string; Technical and technical are treated as two different tags, and both would map to the URL slug technical, which is confusing. Pick one convention and stick to it.

Where tag URLs come from

The theme stores each tag as a name (what you write in frontmatter) and a slug derived with kebab-case: spaces become hyphens, letters are lowercased. Examples:

Tag in frontmatterURL path (then add your site’s trailing slash)
Technical/tags/technical
Dark Arts/tags/dark-arts
Azure/tags/azure

There is also an index of all tags at /tags.

The header links in gatsby-config.ts are just normal links. If you want a menu item to open a tag listing, set that entry’s slug to the tag URL (for example /tags/technical, or /tags/technical/ with this project’s trailing-slash setting).

To surface a new pillar:

  1. Use one consistent tag string on every relevant post.
  2. Add a { title, slug } entry under navigation in gatsby-config.ts, with slug equal to /tags/<kebab-case-of-that-tag-name>.

If you are unsure of the slug, run bun dev, open a post that uses the tag, and follow the tag link from the post UI, or open /tags and use the listed URLs.

Static pages

MDX files under content/pages do not use the post tags field for theme tag pages. Use content/posts for anything that should appear on /blog, on the home “latest posts” list, and on tag listings.


Last updated on