Merge pull request #177 from Mitrichius/fix-164-taxonomy-with-space

Fix taxonomy with space #164
This commit is contained in:
Dmitry Kolosov 2023-05-05 21:20:16 +02:00 committed by GitHub
commit a9272e10f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,7 @@
{{ if .Params.categories }}
<ul class="post-categories">
{{ range $cat_name := .Params.categories }}
{{ $cat := ($.Site.GetPage (printf "/categories/%s" $cat_name)) }}
{{ $cat := ($.Site.GetPage (printf "/categories/%s" $cat_name | urlize )) }}
<li><a href="{{ $cat.Permalink }}">{{ $cat.Title | default $cat_name }}</a></li>
{{ end }}
</ul>
@ -24,7 +24,7 @@
{{ if .Params.tags }}
<ul class="post-tags">
{{ range $tag_name := .Params.tags }}
{{ $tag := ($.Site.GetPage (printf "/tags/%s" $tag_name)) }}
{{ $tag := ($.Site.GetPage (printf "/tags/%s" $tag_name | urlize )) }}
<li><a href="{{ $tag.Permalink }}">#{{ $tag.Title | default $tag_name }}</a></li>
{{ end }}
</ul>
@ -32,7 +32,7 @@
{{ if .Params.authors }}
<ul class="post-authors">
{{ range $author_name := .Params.authors }}
{{ $author := ($.Site.GetPage (printf "/authors/%s" $author_name)) }}
{{ $author := ($.Site.GetPage (printf "/authors/%s" $author_name | urlize )) }}
<li><a href="{{ $author.Permalink }}">@{{ $author_name }}</a></li>
{{ end }}
</ul>