From 117dd4b81e8a0d6d0b95f7bcf1228fa74d793bb8 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Fri, 18 Sep 2020 20:05:19 +0200 Subject: [PATCH] fix(article/details): fix custom taxonomy link --- .../partials/article/components/details.html | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/layouts/partials/article/components/details.html b/layouts/partials/article/components/details.html index 1a3faa9..016e9d6 100644 --- a/layouts/partials/article/components/details.html +++ b/layouts/partials/article/components/details.html @@ -5,15 +5,14 @@ {{ if $categories }}
{{ range $category := $categories }} - {{ with $.Site.GetPage (printf "/categories/%s" $category) }} - {{ if and $image.exists $image.resource }} - {{- $imageRaw := $image.resource | resources.Fingerprint "md5" -}} - {{- $20x := $imageRaw.Fill "20x20 smart" -}} - {{ .Title | humanize }} - {{ else }} - {{ .Title | humanize }} - {{ end }} + {{ $term := $.Site.GetPage (printf "/categories/%s" $category) }} + {{ if and $image.exists $image.resource }} + {{- $imageRaw := $image.resource | resources.Fingerprint "md5" -}} + {{- $20x := $imageRaw.Fill "20x20 smart" -}} + {{ $term.Title | humanize }} + {{ else }} + {{ $term.Title | humanize }} {{ end }} {{ end }}