{{- $ctx := . -}} {{- $scratch := newScratch -}} {{- $scratch.Set "blocks" 0 -}} {{- $taxonomyNames := slice -}} {{- range $taxonomy, $_ := $ctx.Site.Taxonomies -}} {{- $taxonomyNames = $taxonomyNames | append $taxonomy -}} {{- end -}} {{- range sort $taxonomyNames -}} {{- $taxonomy := . -}} {{- with $ctx.Page.GetTerms $taxonomy -}} {{- $scratch.Add "blocks" 1 -}} {{- end -}} {{- end -}} {{- with $ctx.Params.keywords -}} {{- if gt (len .) 0 -}} {{- $scratch.Add "blocks" 1 -}} {{- end -}} {{- end -}} {{- if gt ($scratch.Get "blocks") 0 -}}

Taxonomies

{{- range sort $taxonomyNames -}} {{- $taxonomy := . -}} {{- with $ctx.Page.GetTerms $taxonomy -}} {{- $taxonomyPage := $ctx.Site.GetPage "taxonomy" $taxonomy -}}
{{ with $taxonomyPage }}{{ .Title }}{{ else }}{{ humanize $taxonomy }}{{ end }} {{- partial "keywords.html" . -}}
{{- end -}} {{- end -}} {{- with $ctx.Params.keywords -}} {{- if gt (len .) 0 -}}
Mots-clés libres {{- partial "keywords.html" . -}}
{{- end -}} {{- end -}}
{{- end -}}