{# macros/tags.html — tag display-name normalization. `display(tag)` returns a human-readable form of a kebab-case tag slug. Overrides come from data/tag-names.toml; tags without an override get Title-Cased automatically by stripping hyphens and applying `| title`. Import in a template with: {% import "macros/tags.html" as tagmacros %} And call: {{ tagmacros::display(tag=t) }} #} {% macro display(tag) %} {%- set overrides = load_data(path="data/tag-names.toml", required=false) -%} {%- if overrides -%} {{- overrides[tag] | default(value=tag | replace(from="-", to=" ") | title) -}} {%- else -%} {{- tag | replace(from="-", to=" ") | title -}} {%- endif -%} {% endmacro display %}