diff --git a/layouts/partials/article/components/details.html b/layouts/partials/article/components/details.html index 89d5554..1e7ea18 100644 --- a/layouts/partials/article/components/details.html +++ b/layouts/partials/article/components/details.html @@ -1,16 +1,19 @@ -{{ $image := partialCached "helper/image" (dict "Context" .) .RelPermalink }} -{{ $context := . }} +{{- $image := partialCached "helper/image" (dict "Context" .) .RelPermalink -}} +{{- $context := . -}} +{{- $categories := .Params.categories -}}
- {{ with $categories := .Params.categories }} + {{ if $categories }}
- {{ range $categories }} - {{ if and $image.exists $image.resource }} - {{- $imageRaw := $image.resource | resources.Fingerprint "md5" -}} - {{- $20x := $imageRaw.Fill "20x20 smart" -}} - {{ . | humanize }} - {{ else }} - {{ . | humanize }} + {{ 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 }} {{ end }} {{ end }}
diff --git a/layouts/partials/article/components/footer.html b/layouts/partials/article/components/footer.html index 102bc4a..3431c81 100644 --- a/layouts/partials/article/components/footer.html +++ b/layouts/partials/article/components/footer.html @@ -1,11 +1,5 @@