From: Danilo M. Date: Tue, 21 Apr 2026 10:09:53 +0000 (+0200) Subject: fix: use dedicated article-card partial for taxonomy pages X-Git-Tag: release_22042026-1342~39 X-Git-Url: https://git.danix.xyz/?a=commitdiff_plain;h=a14e39f1e7ca28fd27380efef855617c070ce256;p=danix.xyz-2.git fix: use dedicated article-card partial for taxonomy pages 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 --- 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 }}