You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$taxonomy would be values such as categories / tags.
badge.html behavior: Accept both strings and maps.
If given a string, keep current behavior (backward compatible). If given a map, read text and type, and append a type-specific class.
Styling hooks: Add type-specific classes (e.g., .badge-category / .badge-tag or .badge--categories / .badge--tags) so users can override colors via CSS.
Default behavior: No change to existing output unless type is provided.
Why this might be useful
A small visual improvement with broad applicability that doesn’t change existing behavior.
Alternatives considered
Overriding badge.html or article-meta/basic.html, but that adds maintenance overhead and upgrade friction.
Related issues checked
I have checked existing Issues and did not find the same request.
Related discussions checked
I have searched existing Discussions (e.g., “badge”, “taxonomy badge”, “tag badge”, “category badge”) and did not find the same request.
Demo / screenshots
Below are example screenshots from my own site built on Blowfish:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Propose optional styling hooks so taxonomy badges can use different colors for categories and tags.
Problem
Taxonomy badges currently share a single style, making categories and tags harder to distinguish at a glance.
Proposed solution
Allow
badge.htmlto accept atype(e.g.,category/tag) and emit corresponding classes for easy CSS overrides.Details
article-meta/basic.html, pass adictso the badge knows its source type. Example:{{ partial "badge.html" (dict "text" .LinkTitle "type" $taxonomy) }}$taxonomywould be values such ascategories/tags.If given a string, keep current behavior (backward compatible). If given a map, read
textandtype, and append a type-specific class..badge-category/.badge-tagor.badge--categories/.badge--tags) so users can override colors via CSS.typeis provided.Why this might be useful
A small visual improvement with broad applicability that doesn’t change existing behavior.
Alternatives considered
Overriding
badge.htmlorarticle-meta/basic.html, but that adds maintenance overhead and upgrade friction.Related issues checked
I have checked existing Issues and did not find the same request.
Related discussions checked
I have searched existing Discussions (e.g., “badge”, “taxonomy badge”, “tag badge”, “category badge”) and did not find the same request.
Demo / screenshots
Below are example screenshots from my own site built on Blowfish:
Beta Was this translation helpful? Give feedback.
All reactions