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

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

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