{{- /*
  List of languages (taxonomy) chips with images
  Context: page.Pages
  */
-}}
{{- range . -}}
  {{- if eq .File nil }}
    {{- errorf "[languages] Undefined language: '%s' in %s" (urlize (strings.ToLower .Title)) page.File.Filename }}
  {{- end }}
  {{- if not .Page.Params.icon }}
    {{- errorf "[languages] language is missing an icon: '%s' in %s" (urlize (strings.ToLower .Title)) page.File.Filename }}
  {{- end }}
  <span class="chip">
    <img
      class="py-1"
      height="18"
      width="18"
      title="{{ .Page.LinkTitle }}"
      src="{{ .Page.Params.icon }}"
    />
    <span>{{ .Page.LinkTitle }}</span>
  </span>
{{- end -}}
