From d32ef68eabe6fb8d044d936d2e59909cd613920d Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 15 Apr 2026 22:05:38 +0200 Subject: Implement taxonomy system for tags and categories - Enable tags and categories taxonomies in hugo.toml - Create taxonomy/list.html for archive pages (/tags, /categories) - Create taxonomy/term.html for individual term pages (/tags/example) - Add quote shortcode for quote-type articles - Both templates reuse article-list-item partial for consistent styling Co-Authored-By: Claude Haiku 4.5 --- themes/danix-xyz-hacker/layouts/taxonomy/list.html | 31 ++++++++++++++++++ themes/danix-xyz-hacker/layouts/taxonomy/term.html | 38 ++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 themes/danix-xyz-hacker/layouts/taxonomy/list.html create mode 100644 themes/danix-xyz-hacker/layouts/taxonomy/term.html (limited to 'themes/danix-xyz-hacker/layouts/taxonomy') diff --git a/themes/danix-xyz-hacker/layouts/taxonomy/list.html b/themes/danix-xyz-hacker/layouts/taxonomy/list.html new file mode 100644 index 0000000..fd4b5d9 --- /dev/null +++ b/themes/danix-xyz-hacker/layouts/taxonomy/list.html @@ -0,0 +1,31 @@ +{{ define "main" }} +
+ +

+ {{ i18n .Data.Plural }} +

+ + +
+ {{ $pinned := where .Pages "Params.pinned" true }} + {{ $unpinned := where .Pages "Params.pinned" false }} + + + {{ range (sort $pinned "Date" "desc") }} + {{ partial "article-list-item.html" . }} + {{ end }} + + + {{ range (sort $unpinned "Date" "desc") }} + {{ partial "article-list-item.html" . }} + {{ end }} + + + {{ if eq (len .Pages) 0 }} +
+ {{ i18n "noRelated" }} +
+ {{ end }} +
+
+{{ end }} diff --git a/themes/danix-xyz-hacker/layouts/taxonomy/term.html b/themes/danix-xyz-hacker/layouts/taxonomy/term.html new file mode 100644 index 0000000..5353715 --- /dev/null +++ b/themes/danix-xyz-hacker/layouts/taxonomy/term.html @@ -0,0 +1,38 @@ +{{ define "main" }} +
+ +

+ {{ i18n .Data.Singular }} +

+ + +

+ + {{ .Title }} + +

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