asw/layouts/partials/tag-nav.html
Vigilio Desto 5deaa22e38
Port head partials: SEO, OG, JSON-LD, AI disclosure, tag-nav
- layouts/partials/head.html: full <head> partial with meta partials + CSS pipeline
- layouts/partials/meta/seo.html: canonical URL + robots directives
- layouts/partials/meta/og.html: Open Graph + Twitter Card meta tags
- layouts/partials/meta/ai-disclosure.html: AI content disclosure (EU AI Act)
- layouts/partials/meta/json-ld.html: Schema.org JSON-LD structured data
- layouts/partials/tag-nav.html: site-wide tag cloud partial
- layouts/_default/baseof.html: simplified to use partial head.html
- layouts/_default/single.html: removed inline head block (now in head.html)

Verified: canonical, robots, OG tags, ai-content-disclosure on live pages.
96 pages build clean.

Closes: asw#15
2026-04-10 18:42:21 +02:00

21 lines
725 B
HTML

{{- /*
tag-nav.html — renders all site tags as a navigable tag cloud.
Usage in a layout:
{{ partial "tag-nav.html" . }}
Outputs: <nav data-role="tag-cloud"> with links to each tag page.
The (N) count shows how many pages have each tag.
*/ -}}
{{- $tags := .Site.Taxonomies.tags -}}
{{- if $tags }}
<nav data-role="tag-cloud" aria-label="Browse by tag">
{{- range $name, $pages := $tags }}
{{- $tagPage := site.GetPage (printf "/tags/%s" ($name | urlize)) }}
<a href="{{ if $tagPage }}{{ $tagPage.Permalink }}{{ else }}{{ print site.BaseURL "tags/" ($name | urlize) "/" }}{{ end }}" data-tag="{{ $name }}">
{{ $name -}}
<small>({{ len $pages }})</small>
</a>
{{- end }}
</nav>
{{- end }}