Skip to content
Permalink
Browse files

Fix meta/categories field [2]

More proper fix to meta/categories bug.

Fixes #156
  • Loading branch information
Vimux committed Nov 29, 2019
1 parent 946a258 commit 650ed329c4136cd912bfa810dac50c037be21e3a
Showing with 3 additions and 2 deletions.
  1. +3 −2 layouts/partials/post_meta/categories.html
@@ -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 }}

0 comments on commit 650ed32

Please sign in to comment.
You can’t perform that action at this time.