-
-
Notifications
You must be signed in to change notification settings - Fork 5
fix: restore tags page tag cloud and normalize raspberry-pi tags #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,3 +1,33 @@ | ||||||||||||||||||||||||||||||||
| {{- if eq .Kind "taxonomy" -}} | ||||||||||||||||||||||||||||||||
| <section class="container taxonomy"> | ||||||||||||||||||||||||||||||||
| <header> | ||||||||||||||||||||||||||||||||
| <h1 class="title"> | ||||||||||||||||||||||||||||||||
| <a class="title-link" href="{{ .Permalink | safeURL }}"> | ||||||||||||||||||||||||||||||||
| {{- i18n (lower .Title) | default .Title | title -}} | ||||||||||||||||||||||||||||||||
| </a> | ||||||||||||||||||||||||||||||||
| {{ with .Params.icon }} | ||||||||||||||||||||||||||||||||
| <i class="{{ . }}" aria-hidden="true"></i> | ||||||||||||||||||||||||||||||||
| {{ end }} | ||||||||||||||||||||||||||||||||
| </h1> | ||||||||||||||||||||||||||||||||
| </header> | ||||||||||||||||||||||||||||||||
| {{ .Content }} | ||||||||||||||||||||||||||||||||
| <ul> | ||||||||||||||||||||||||||||||||
| {{ $type := .Type }} | ||||||||||||||||||||||||||||||||
| {{ range $key, $value := .Data.Terms.Alphabetical }} | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
| {{ range $key, $value := .Data.Terms.Alphabetical }} | |
| {{ range .Data.Terms.Alphabetical }} |
Copilot
AI
Mar 10, 2026
There was a problem hiding this comment.
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.
| {{ $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> |
There was a problem hiding this comment.
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 theraspberry-piterm. Consider updating the description to avoid implying the canonical URL is moving away from/tags/raspberry-pi/.