{{- if eq .Kind "taxonomy" }} {{- else if eq .Kind "term" }} {{- $lastCapital := "" }} {{- $pages := slice }} {{- range .Pages }} {{- if and .Title .RelPermalink (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableTagHiddenPages true) ) }} {{- $pages = $pages | append (dict "Title" .Title "Page" . )}} {{- end }} {{- end }} {{- $toc_term := "" }} {{- range sort $pages ".Title" }} {{- $capital := substr .Title 0 1 | upper }} {{- if ne $lastCapital $capital }} {{- $toc_term = printf "%s