From: Danilo M. Date: Thu, 16 Apr 2026 10:44:04 +0000 (+0200) Subject: fix: restore articles to taxonomy pages and fix i18n headings X-Git-Tag: release_22042026-1342~204 X-Git-Url: https://git.danix.xyz/?a=commitdiff_plain;h=8c32ae9e73d34c66284466641610b25d319347db;p=danix.xyz-2.git fix: restore articles to taxonomy pages and fix i18n headings Fixed two critical bugs in taxonomy layouts: 1. Pinned/unpinned filter was silently hiding all articles. The filter only matched pages that explicitly set pinned=false, dropping all articles that omitted the parameter (most articles have nil, not false). Added the nil/empty fallback from _default/list.html. 2. Missing i18n keys caused blank headings on some taxonomy pages: - Added 'tag' key for /tags/term/ pages - Added 'categories' key for /categories/ list page 3. Harmonized spacing with main article list for visual consistency: Changed from space-y-2 max-w-2xl to space-y-6 max-w-3xl Changes: - i18n/en.yaml: Added 'tag' and 'categories' keys - i18n/it.yaml: Added 'tag' and 'categories' keys - taxonomy/list.html: Added nil fallback + spacing fix - taxonomy/term.html: Added nil fallback + spacing fix Co-Authored-By: Claude Haiku 4.5 --- diff --git a/i18n/en.yaml b/i18n/en.yaml index 2bcf579..2a90f2b 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -21,6 +21,8 @@ readingTime: "reading time" min: "min" author: "Author" category: "Category" +categories: "Categories" +tag: "Tag" tags: "Tags" relatedPosts: "Related articles" noRelated: "No related articles." diff --git a/i18n/it.yaml b/i18n/it.yaml index e22c0c5..9fd729e 100644 --- a/i18n/it.yaml +++ b/i18n/it.yaml @@ -21,6 +21,8 @@ readingTime: "tempo di lettura" min: "min" author: "Autore" category: "Categoria" +categories: "Categorie" +tag: "Tag" tags: "Tag" relatedPosts: "Articoli correlati" noRelated: "Nessun articolo correlato." diff --git a/themes/danix-xyz-hacker/layouts/taxonomy/list.html b/themes/danix-xyz-hacker/layouts/taxonomy/list.html index fd4b5d9..b923aba 100644 --- a/themes/danix-xyz-hacker/layouts/taxonomy/list.html +++ b/themes/danix-xyz-hacker/layouts/taxonomy/list.html @@ -6,10 +6,18 @@ -
+
{{ $pinned := where .Pages "Params.pinned" true }} {{ $unpinned := where .Pages "Params.pinned" false }} + + {{ if eq (len $unpinned) 0 }} + {{ $unpinned = where .Pages "Params.pinned" nil }} + {{ if eq (len $unpinned) 0 }} + {{ $unpinned = where .Pages "Params.pinned" "" }} + {{ end }} + {{ end }} + {{ range (sort $pinned "Date" "desc") }} {{ partial "article-list-item.html" . }} diff --git a/themes/danix-xyz-hacker/layouts/taxonomy/term.html b/themes/danix-xyz-hacker/layouts/taxonomy/term.html index 5353715..5858f64 100644 --- a/themes/danix-xyz-hacker/layouts/taxonomy/term.html +++ b/themes/danix-xyz-hacker/layouts/taxonomy/term.html @@ -13,10 +13,18 @@

-
+
{{ $pinned := where .Pages "Params.pinned" true }} {{ $unpinned := where .Pages "Params.pinned" false }} + + {{ if eq (len $unpinned) 0 }} + {{ $unpinned = where .Pages "Params.pinned" nil }} + {{ if eq (len $unpinned) 0 }} + {{ $unpinned = where .Pages "Params.pinned" "" }} + {{ end }} + {{ end }} + {{ range (sort $pinned "Date" "desc") }} {{ partial "article-list-item.html" . }}