Skip to content

fix: restore tags page tag cloud and normalize raspberry-pi tags#44

Merged
jmeridth merged 1 commit intomainfrom
jm_fix_tags_page
Mar 10, 2026
Merged

fix: restore tags page tag cloud and normalize raspberry-pi tags#44
jmeridth merged 1 commit intomainfrom
jm_fix_tags_page

Conversation

@jmeridth
Copy link
Owner

What

Added taxonomy-specific rendering to the list partial override so taxonomy pages (like /tags/) display as a tag cloud with counts instead of a dated post list. Also consolidated the "raspberry pi", "raspberrypi", and "raspberry pi" tag variants across all four Raspberry Pi Kubernetes Cluster posts into a single "raspberry-pi" tag.

Why

The hugo-coder theme update merged the taxonomy template into the generic list partial, causing the tags page to render as a post list instead of its original tag cloud format. The inconsistent tag naming also created duplicate tag entries on the tags page.

Notes

  • The list.html partial now branches on .Kind "taxonomy" — any future taxonomy pages will also get the tag cloud format rather than the dated list format
  • The tag URL will change from /tags/raspberry-pi/ consolidating what were previously separate pages for each variant

## What

Added taxonomy-specific rendering to the list partial override so taxonomy pages
(like /tags/) display as a tag cloud with counts instead of a dated post list.
Also consolidated the "raspberry pi", "raspberrypi", and "raspberry pi" tag
variants across all four Raspberry Pi Kubernetes Cluster posts into a single
"raspberry-pi" tag.

## Why

The hugo-coder theme update merged the taxonomy template into the generic list
partial, causing the tags page to render as a post list instead of its original
tag cloud format. The inconsistent tag naming also created duplicate tag entries
on the tags page.

## Notes

- The list.html partial now branches on `.Kind "taxonomy"` — any future taxonomy pages will also get the tag cloud format rather than the dated list format
- The tag URL will change from `/tags/raspberry-pi/` consolidating what were previously separate pages for each variant

Signed-off-by: jmeridth <jmeridth@gmail.com>
@jmeridth jmeridth self-assigned this Mar 10, 2026
Copilot AI review requested due to automatic review settings March 10, 2026 07:30
@jmeridth jmeridth merged commit 2fc48f3 into main Mar 10, 2026
6 checks passed
@jmeridth jmeridth deleted the jm_fix_tags_page branch March 10, 2026 07:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restores the Hugo taxonomy list rendering so /tags/ (and other taxonomy list pages) display a term “cloud” with counts, and it normalizes Raspberry Pi tag variants across the Kubernetes cluster posts into a single raspberry-pi tag.

Changes:

  • Add .Kind == "taxonomy" branching in the list.html partial to render taxonomy term lists with counts.
  • Consolidate Raspberry Pi tag variants into raspberry-pi across 4 posts.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
layouts/partials/list.html Adds taxonomy-specific rendering to show term list + counts instead of post list.
content/posts/2018-04-07-raspberry-pi-kubernetes-cluster-part-1.md Normalizes tag to raspberry-pi.
content/posts/2018-05-02-raspberry-pi-kubernetes-cluster-part-2.md Normalizes tag to raspberry-pi.
content/posts/2018-12-24-raspberry-pi-kubernetes-cluster-part-3.md Normalizes tag to raspberry-pi.
content/posts/2018-12-28-raspberry-pi-kubernetes-cluster-part-4.md Normalizes tag to raspberry-pi.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +15 to +22
{{ $type := .Type }}
{{ range $key, $value := .Data.Terms.Alphabetical }}
{{ $name := .Name }}
{{ $count := .Count }}
{{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
<li>
<span class="taxonomy-element">
<a href="{{ .Permalink }}">{{ .Name }}</a>
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the taxonomy branch, links are resolved via $.Site.GetPage (printf "/%s/%s" $type $name), where $name comes from .Name. This can drop terms when the displayed name differs from the URLized term (e.g., spaces/uppercase/special chars), and it also does an extra lookup per term. Prefer using the term page that is already available from .Data.Terms.Alphabetical (e.g., the entry’s .Page/permalink), or at minimum URLize $name before building the path.

Suggested change
{{ $type := .Type }}
{{ range $key, $value := .Data.Terms.Alphabetical }}
{{ $name := .Name }}
{{ $count := .Count }}
{{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
<li>
<span class="taxonomy-element">
<a href="{{ .Permalink }}">{{ .Name }}</a>
{{ range $key, $value := .Data.Terms.Alphabetical }}
{{ $termPage := .Page }}
{{ $count := .Count }}
{{ with $termPage }}
<li>
<span class="taxonomy-element">
<a href="{{ .Permalink }}">{{ .Title }}</a>

Copilot uses AI. Check for mistakes.
{{ .Content }}
<ul>
{{ $type := .Type }}
{{ range $key, $value := .Data.Terms.Alphabetical }}
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

range $key, $value := .Data.Terms.Alphabetical declares $key/$value but the template uses the implicit dot (.) instead; consider simplifying to range .Data.Terms.Alphabetical (or consistently use $value) to avoid unused variables and make the intent clearer.

Suggested change
{{ range $key, $value := .Data.Terms.Alphabetical }}
{{ range .Data.Terms.Alphabetical }}

Copilot uses AI. Check for mistakes.
Comment on lines 6 to +7
- kubernetes
- raspberry pi
- raspberry-pi
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description note says the tag URL will change "from /tags/raspberry-pi/", but this change is consolidating variants to the raspberry-pi term. Consider updating the description to avoid implying the canonical URL is moving away from /tags/raspberry-pi/.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants