Fixed Categories

Okay, I’ve mange to get fixed.

The main problem was the way hugo handles categories before. They don’t, everything is stored as a Taxonomies. Back when I’ve made the change the code had to filter for the category of each given posts. That seems not work anymore. Instead, you can just ask for the given category out of the current Content object.

-    {{ $taxonomy := "categories" }}
+    {{- if .GetTerms "categories"}}
          <span> posted in 
-    {{ with .Param $taxonomy }}
-        {{ range $index, $category := . }}
-          {{ with $.Site.GetPage (printf "/%s/%s" $taxonomy $category) -}}
-              <a href="{{ .Permalink }}">{{ $category | urlize }}</a>
-          {{- end -}}
-        {{- end -}}
+    {{ range (.GetTerms "categories") }}
+        <a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
+       {{ end }}

This makes the code very clean and slick again. Nice