{{ define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end }} {{ define "content" }} {{ $taxonomy := .Data.Singular }} {{ $taxonomysName := $taxonomy }} {{ if eq $taxonomy "tag"}} {{ $taxonomysName = (T "tags") }} {{ else if eq $taxonomy "category"}} {{ $taxonomysName = (T "categories") }} {{ end }} {{ $terms := .Data.Terms.ByCount }} {{ $length := len $terms }} {{ $type := .Type }}

{{- printf "- %s -" $taxonomysName -}}

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