{{ define "content" }} {{ $termName := .Data.Plural }} {{ $terms := .Data.Terms.ByCount }} {{ $length := len $terms }} {{ $type := .Type }}

- {{ .Data.Plural | humanize }} -

{{ if and $.Site.Taxonomies.categories (eq $termName "categories") }}
{{ range $terms }} {{ $term := .Term }} {{ $pages := .Pages }} {{ with $.Site.GetPage "taxonomy" (printf "%s/%s" $type $term) }}

{{ $term | humanize}}

{{ range first 5 $pages }} {{ end }} {{ if gt (len $pages) 5 }} More >> {{ end }}
{{ end }} {{ end }}
{{ else if and $.Site.Taxonomies.tags (eq $termName "tags") }}
{{ range $.Site.Taxonomies.tags.ByCount }} {{ if .Name }} {{ .Name }} ({{ .Count }}) {{ end }} {{end}}
{{ end }}
{{end }}