fix(article/details): fix custom taxonomy link
This commit is contained in:
parent
b2a1afd744
commit
117dd4b81e
@ -5,15 +5,14 @@
|
|||||||
{{ if $categories }}
|
{{ if $categories }}
|
||||||
<header class="article-category">
|
<header class="article-category">
|
||||||
{{ range $category := $categories }}
|
{{ range $category := $categories }}
|
||||||
{{ with $.Site.GetPage (printf "/categories/%s" $category) }}
|
{{ $term := $.Site.GetPage (printf "/categories/%s" $category) }}
|
||||||
{{ if and $image.exists $image.resource }}
|
{{ if and $image.exists $image.resource }}
|
||||||
{{- $imageRaw := $image.resource | resources.Fingerprint "md5" -}}
|
{{- $imageRaw := $image.resource | resources.Fingerprint "md5" -}}
|
||||||
{{- $20x := $imageRaw.Fill "20x20 smart" -}}
|
{{- $20x := $imageRaw.Fill "20x20 smart" -}}
|
||||||
<a href="{{ .Permalink }}" class="color-tag"
|
<a href="{{ $term.Permalink }}" class="color-tag"
|
||||||
data-image="{{ $20x.RelPermalink }}" data-key="{{ $context.Slug }}" data-hash="{{ $imageRaw.Data.Integrity }}">{{ .Title | humanize }}</a>
|
data-image="{{ $20x.RelPermalink }}" data-key="{{ $context.Slug }}" data-hash="{{ $imageRaw.Data.Integrity }}">{{ $term.Title | humanize }}</a>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<a href="{{ printf `categories/%s` (. | urlize) | relLangURL }}">{{ .Title | humanize }}</a>
|
<a href="{{ $term.Permalink }}">{{ $term.Title | humanize }}</a>
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</header>
|
</header>
|
||||||
|
Loading…
Reference in New Issue
Block a user