Sort Issues with String Array

One of the pages that uses this template does not have “blog/tags” set in front matter. You need to code defensively.

Instead of this:

{{ .Param "blog/tags" | sort }}

Do this:

{{ with .Param "blog/tags" }}
  {{ . | sort }}
{{ end }}
1 Like