diff options
-rw-r--r-- | layouts/partials/post-info.html | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/layouts/partials/post-info.html b/layouts/partials/post-info.html index c358a44..32b918b 100644 --- a/layouts/partials/post-info.html +++ b/layouts/partials/post-info.html @@ -10,8 +10,9 @@ {{ if .Params.categories }} Categories: <ul class="post-categories"> - {{ range .Params.categories }} - <li><a href="{{ "categories/" | absLangURL }}{{ . | urlize }}">{{ . }}</a></li> + {{ range $cat_name := .Params.categories }} + {{ $cat := ($.Site.GetPage (printf "/categories/%s" $cat_name | urlize )) }} + <li><a href="{{ $cat.Permalink }} ">{{ $cat_name }}</a></li> {{ end }} </ul> {{ end }} @@ -19,8 +20,9 @@ {{ if .Params.tags }} Tags: <ul class="post-tags"> - {{ range .Params.tags }} - <li><a href="{{ "tags/" | absLangURL }}{{ . | urlize }}">#{{ . }}</a></li> + {{ range $tag_name := .Params.tags }} + {{ $tag := ($.Site.GetPage (printf "/tags/%s" $tag_name | urlize )) }} + <li><a href="{{ $tag.Permalink }}">#{{ $tag_name }}</a></li> {{ end }} </ul> {{ end }} |