mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-23 10:21:46 +01:00
Fix categories with special char or spaces not displayed correctly
Call to [`urlize`](https://gohugo.io/functions/urlize/) to get the category url instead of using its name directly.
This commit is contained in:
parent
809fa7860d
commit
1d95c4b8ff
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@
|
|||
{{ if $categories }}
|
||||
<header class="article-category">
|
||||
{{ range $category := $categories }}
|
||||
{{ $term := $.Site.GetPage (printf "/categories/%s" $category) }}
|
||||
{{ $term := $.Site.GetPage (printf "/categories/%s" $category | urlize ) }}
|
||||
{{ if and $image.exists $image.resource }}
|
||||
{{- $imageRaw := $image.resource | resources.Fingerprint "md5" -}}
|
||||
{{- $20x := $imageRaw.Fill "20x20 smart" -}}
|
||||
|
|
Loading…
Reference in a new issue