{{ 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 }}{{ range $cats }}{{ . }}{{ end }}{{ end }} {{ range $cats }}{{ $cat := print . }} {{ $cat }} {{ range $all }}{{ if eq (print (default "Other" .Params.category)) $cat }}{{ template "listing-card" . }}{{ end }}{{ end }} {{ else }}Nothing listed yet.{{ end }} {{ end }}
Nothing listed yet.