Skip to content

Commit

Permalink
Fix meta/categories field [2]
Browse files Browse the repository at this point in the history
More proper fix to meta/categories bug.

Fixes #156
  • Loading branch information
Vimux committed Nov 29, 2019
1 parent 946a258 commit 650ed32
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions layouts/partials/post_meta/categories.html
Expand Up @@ -4,8 +4,9 @@
{{ partial "svg/category.svg" (dict "class" "meta__icon") }}
<span class="meta__text">
{{- range $index, $category := . }}
{{- $name := . -}}
{{- with $.Site.GetPage (printf "/%s/%s" $taxo ($name | anchorize)) }}
{{- $url := urls.Parse ($category | urlize) -}}
{{- $path := $url.Path -}}
{{- with $.Site.GetPage (printf "/%s/%s" $taxo $path) }}
{{- if gt $index 0 }}, {{ end -}}
<a class="meta__link" href="{{ .RelPermalink }}" rel="category">{{ .Title }}</a>
{{- end }}
Expand Down

0 comments on commit 650ed32

Please sign in to comment.