From 1d95c4b8ff5866dd677cc58a3de5039a12ab6915 Mon Sep 17 00:00:00 2001 From: romainx Date: Fri, 9 Oct 2020 09:49:19 +0200 Subject: [PATCH] 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. --- layouts/partials/article/components/details.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/article/components/details.html b/layouts/partials/article/components/details.html index 016e9d6..60095de 100644 --- a/layouts/partials/article/components/details.html +++ b/layouts/partials/article/components/details.html @@ -5,7 +5,7 @@ {{ if $categories }}
{{ 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" -}}