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

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

{{- /* Categories Page */ -}} {{- if eq $taxonomies "categories" -}}
{{- range $terms -}} {{- $term := .Term -}} {{- $pages := .Pages -}} {{- with $.Site.GetPage "taxonomy" (printf "%s/%s" $type $term) -}}

 {{ .Page.Title }}

{{- 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 -}}