jakewies / hugo-theme-codex

A minimal blog theme for Hugo 🍜
https://themes.gohugo.io/themes/hugo-theme-codex/
MIT License
334 stars 188 forks source link

Tag with spaces isn't shown in post #155

Open mejedi opened 3 years ago

mejedi commented 3 years ago

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>