diff options
author | Jimmy Cai <jimmehcai@gmail.com> | 2020-09-13 11:14:17 +0300 |
---|---|---|
committer | Jimmy Cai <jimmehcai@gmail.com> | 2020-09-13 11:14:17 +0300 |
commit | 2451b194dc022b9a2b6ad23c3ec819d3ddb7e1cb (patch) | |
tree | 024621304abf331564df85818b3e27ca7c8dc647 /layouts/partials/article/components/details.html | |
parent | 822eba9513f8e3a29ba280c15a1a9c96c82d4c93 (diff) |
refactor: use relLangURL to build relative links
For better i18n support
Fixes archive page path
Remove tag cloud term exclusion
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/8
Diffstat (limited to 'layouts/partials/article/components/details.html')
-rw-r--r-- | layouts/partials/article/components/details.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/partials/article/components/details.html b/layouts/partials/article/components/details.html index 0a8f777..1b776be 100644 --- a/layouts/partials/article/components/details.html +++ b/layouts/partials/article/components/details.html @@ -7,10 +7,10 @@ {{ if and $image.exists $image.resource }} {{- $imageRaw := $image.resource | resources.Fingerprint "md5" -}} {{- $20x := $imageRaw.Fill "20x20 smart" -}} - <a href="/categories/{{ . | urlize }}" class="color-tag" + <a href="{{ printf `categories/%s` (. | urlize) | relLangURL }}" class="color-tag" data-image="{{ $20x.RelPermalink }}" data-key="{{ $context.Slug }}" data-hash="{{ $imageRaw.Data.Integrity }}">{{ . | humanize }}</a> {{ else }} - <a href="/categories/{{ . | urlize }}">{{ . | humanize }}</a> + <a href="{{ printf `categories/%s` (. | urlize) | relLangURL }}">{{ . | humanize }}</a> {{ end }} {{ end }} </header> |