{{- define "title" -}} {{- T "all" }}{{ T .Data.Plural | default (humanize .Data.Plural) }} | {{ .Site.Title -}} {{- end -}} {{- define "content" -}} {{- $taxonomies := .Data.Plural -}} {{- $terms := .Data.Terms.ByCount -}} {{- $type := .Type -}}
{{- /* Title */ -}}

{{- T "all" | humanize}}{{ T $taxonomies | default $taxonomies | humanize -}}

{{- /* Categories Page */ -}} {{- if eq $taxonomies "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 -}} {{ T "more" }} >> {{- end -}}
{{- end -}} {{- end -}}
{{- /* Tag Cloud Page */ -}} {{- else if eq $taxonomies "tags" -}}
{{- range $.Site.Taxonomies.tags.ByCount -}} {{ .Page.Title }} ({{ .Count }}) {{- end -}}
{{- end -}}
{{- end -}}