hugo-theme-codex icon indicating copy to clipboard operation
hugo-theme-codex copied to clipboard

Tag with spaces isn't shown in post

Open mejedi opened this issue 4 years ago • 0 comments

If a tag with spaces is assigned to a post, it's not rendered. A fix

index 3ab8030..881283a 100644
--- a/themes/codex/layouts/partials/tags.html
+++ b/themes/codex/layouts/partials/tags.html
@@ -2,7 +2,7 @@
 {{ with .Param $taxo }}
 <ul class="tags__list">
     {{ range $index, $tag := . }}
-    {{ with $.Site.GetPage (printf "/%s/%s" $taxo $tag) -}}
+    {{ with $.Site.GetPage (printf "/%s/%s" $taxo (urlize $tag)) -}}
     <li class="tag__item">
         <a class="tag__link" href="{{ .Permalink }}">{{ $tag }}</a>
     </li>

mejedi avatar Feb 07 '21 16:02 mejedi