{{- /* Render the allowed values of one vocabulary as a table. Usage: {{< vocabulary "severity" >}} */ -}} {{- $key := .Get 0 -}} {{- with index hugo.Data.vocabulary $key -}} {{- range $value, $entry := . }} {{- end }}
Value Label Meaning
{{ $value }} {{- with site.GetPage (printf "/%s/%s" $key $value) -}} {{ $entry.label }} {{- else -}} {{ $entry.label }} {{- end -}} {{- with $entry.version }} {{ . }}{{ end }} {{ $entry.description }}
{{- else -}} {{- errorf "vocabulary shortcode: no vocabulary named %q in data/vocabulary.yaml (%s)" $key .Position -}} {{- end -}}