From a14e39f1e7ca28fd27380efef855617c070ce256 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 21 Apr 2026 12:09:53 +0200 Subject: fix: use dedicated article-card partial for taxonomy pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The timeline partial (article-list-item.html) always emits
  • with timeline connector and node markup — calling it with . still produces the same timeline HTML. Created article-card.html with the original
    markup and wired taxonomy templates to use it. Co-Authored-By: Claude Haiku 4.5 --- .../layouts/partials/article-card.html | 92 ++++++++++++++++++++++ themes/danix-xyz-hacker/layouts/taxonomy/list.html | 4 +- themes/danix-xyz-hacker/layouts/taxonomy/term.html | 4 +- 3 files changed, 96 insertions(+), 4 deletions(-) create mode 100644 themes/danix-xyz-hacker/layouts/partials/article-card.html diff --git a/themes/danix-xyz-hacker/layouts/partials/article-card.html b/themes/danix-xyz-hacker/layouts/partials/article-card.html new file mode 100644 index 0000000..0f5cfb9 --- /dev/null +++ b/themes/danix-xyz-hacker/layouts/partials/article-card.html @@ -0,0 +1,92 @@ +{{ $articleType := .Params.type | default "life" }} +{{ $typeConfig := .Site.Params.articleTypes }} +{{ $typeData := index $typeConfig $articleType }} +{{ $excerpt := .Description | default .Summary }} + +{{ $imageURL := "" }} +{{ $useDefaultThumbnail := false }} +{{ if .Params.image }} + {{ $resource := .Resources.GetMatch .Params.image }} + {{ if $resource }} + {{ $imageURL = $resource.RelPermalink }} + {{ else }} + {{ $imageURL = .Params.image }} + {{ end }} +{{ else }} + {{ $useDefaultThumbnail = true }} +{{ end }} + + diff --git a/themes/danix-xyz-hacker/layouts/taxonomy/list.html b/themes/danix-xyz-hacker/layouts/taxonomy/list.html index cd4945a..c3a4317 100644 --- a/themes/danix-xyz-hacker/layouts/taxonomy/list.html +++ b/themes/danix-xyz-hacker/layouts/taxonomy/list.html @@ -21,7 +21,7 @@ {{ range (sort $pinned "Date" "desc") }}
    - {{ partial "article-list-item.html" . }} + {{ partial "article-card.html" . }} {{ i18n "postCount" .Pages.Len }} @@ -31,7 +31,7 @@ {{ range (sort $unpinned "Date" "desc") }}
    - {{ partial "article-list-item.html" . }} + {{ partial "article-card.html" . }} {{ i18n "postCount" .Pages.Len }} diff --git a/themes/danix-xyz-hacker/layouts/taxonomy/term.html b/themes/danix-xyz-hacker/layouts/taxonomy/term.html index 5858f64..1b953bc 100644 --- a/themes/danix-xyz-hacker/layouts/taxonomy/term.html +++ b/themes/danix-xyz-hacker/layouts/taxonomy/term.html @@ -27,12 +27,12 @@ {{ range (sort $pinned "Date" "desc") }} - {{ partial "article-list-item.html" . }} + {{ partial "article-card.html" . }} {{ end }} {{ range (sort $unpinned "Date" "desc") }} - {{ partial "article-list-item.html" . }} + {{ partial "article-card.html" . }} {{ end }} -- cgit v1.2.3