{{ define "main" }}

{{ .Title }}

{{ with .Content }}
{{ . }}
{{ end }} {{ $all := sortBy "category" (sortBy "Title" (collection .Collection)) }} {{ $cats := list }}{{ $last := "" }}{{ range $all }}{{ $c := default "Other" .Params.category }}{{ if ne (print $c) $last }}{{ $cats = append $cats $c }}{{ $last = print $c }}{{ end }}{{ end }} {{ if gt (len $cats) 1 }}{{ end }} {{ range $cats }}{{ $cat := print . }}

{{ $cat }}

{{ else }}

Nothing listed yet.

{{ end }}
{{ end }}