{{- $taxonomy := .taxonomy }} {{- if eq "string" (printf "%T" $taxonomy) }} {{- $taxonomy = .page.GetPage $taxonomy }} {{- end }} {{- $headingstyle := .headingstyle | default "h2" }} {{- with $taxonomy }} {{- .Content }} {{- $lastCapital := "" }} {{- $pages := partialCached "partials/_relearn/pagesTaxonomy.gotmpl" . .Path }} {{- range $pages }} {{- $capital := substr .Title 0 1 | upper }} {{- if ne $lastCapital $capital }} {{- if ne $lastCapital "" }} {{- end }} {{ (printf `<%s id="%s">%s` $headingstyle ($capital | plainify | anchorize) $capital $headingstyle) | safeHTML }} {{- end }} {{- end }}