Brian Strickland

ServiceNow Platform Manager | Product Owner | AI Enthusiast | Developer | CISSP

Adding a Clean Tag System to My Hugo Blog with a Sidebar Tag Cloud

June 24, 2025

I recently added a tag system to my Hugo blog and wanted to keep things clean without cluttering the post list. Rather than listing tags inline under each post, I created a tag cloud in the sidebar. This made the blog more scannable, helped surface recurring themes, and aligned with a minimalist layout.

Here's what I implemented:

  1. Front Matter Tags: Each post now has a tags: array in the YAML front matter, like:
tags: [hugo, static-sites, devops]
  1. Taxonomy Setup: In config.toml, I defined:
[taxonomies]
  tag = "tags"
  1. Tag Index Pages: I added _default/terms.html to list all tags and _default/taxonomy.html to show all posts per tag.
  2. Sidebar Partial: I created layouts/partials/tags-sidebar.html with sorted tag links and counts. This was then included on the blog list page as a second column.
  3. Sorted by Popularity: Tags in the sidebar are sorted by usage:
{{ range sort site.Taxonomies.tags "Count" "desc" }}

Result

Clean main content. Navigable tags. Useful structure that doesn't overwhelm the page.

This is a great pattern if you're using Hugo for a personal blog or project site and want lightweight taxonomy without a plugin system.

Let me know if you'd like to see the exact source snippets I used!


Comments

Loading comments...

Leave a Comment