{{- $page := .page }} {{- $taxonomy := .taxonomy }} {{- $class := .class }} {{- $color := .color | default "" }} {{- $style := .style | default "" }} {{- if and (not $style) (eq (len $style) 0) }} {{- $color = .color | default "var(--INTERNAL-TAG-BG-color)" }} {{- end }} {{- $icon := .icon | default "" }} {{- $icon = trim $icon " " }} {{- if and $icon (not (findRE ".*?\\bfa-\\w.*?" $icon)) }} {{- $icon = printf "fa-fw fas fa-%s" $icon }} {{- end }} {{- $taxonomy_page := $page.Site.GetPage $taxonomy }} {{- $terms := slice | append (index $page.Params $taxonomy) }} {{- $term_pages := slice }} {{- range $terms }} {{- $term := trim . " " }} {{- if not $term }} {{- continue }} {{- end }} {{- $term_key := ($term | plainify | anchorize) }} {{- with $page.Site.GetPage (printf "%s/%s" $taxonomy $term_key) }} {{- $term_pages = $term_pages | append (dict "Title" (default .Data.Term .Title) "Term" . )}} {{- else }} {{- $term_key = ($term | urlize) }} {{- with $page.Site.GetPage (printf "%s/%s" $taxonomy $term_key) }} {{- $term_pages = $term_pages | append (dict "Title" (default .Data.Term .Title) "Term" . )}} {{- end }} {{- end }} {{- end }} {{- $taxonomy_title := default (default $taxonomy_page.Data.Plural (i18n $taxonomy_page.Data.Plural)) $taxonomy_page.Title }} {{- with $term_pages }}