Files
tsuki/layouts/_default/taxonomy.html
T
tiennm99 c30268759f feat: posts, taxonomies, archive (Phase 5)
- post/list.html paginated section list with post-card
- pagination.html partial (renders only when >1 page)
- _default/taxonomy.html for term lists (/tags/, /categories/) with counts
- taxonomy/term.html for single term pages (paginated posts)
- archives/list.html + archive-group.html: year/month grouped flat list
- exampleSite: 4 new posts across 2025-2026, 2 categories, 4 tags, archive index

Modern Hugo 0.146+ template naming: term.html resolved via taxonomy/
path (Hugo 0.154 lookup ignores _default/term.html).
2026-05-07 21:10:28 +07:00

20 lines
581 B
HTML

{{ define "body_class" }}list taxonomy-list{{ end }}
{{ define "main" }}
<header class="list-header">
<h1 class="list-title">{{ .Title }}</h1>
{{- with .Description }}<p class="list-description">{{ . }}</p>{{ end }}
</header>
<ul class="terms-list">
{{- range .Pages.ByTitle }}
<li class="term-item">
<a class="term-link" href="{{ .RelPermalink }}">
<span class="term-name">{{ .Title }}</span>
<span class="term-count" aria-label="{{ len .Pages }} {{ i18n "posts" | default "bài" }}">{{ len .Pages }}</span>
</a>
</li>
{{- end }}
</ul>
{{ end }}