2019-02-05 16:33:23 +00:00
|
|
|
{{ $glossaryBundle := site.GetPage "page" "docs/reference/glossary" }}
|
2018-10-01 19:38:37 +00:00
|
|
|
{{- if $glossaryBundle -}}
|
2019-07-14 10:41:04 +00:00
|
|
|
{{ $pages := $glossaryBundle.Resources.ByType "page" }}
|
|
|
|
{{- range site.Params.language_alternatives -}}
|
|
|
|
{{- with (where $glossaryBundle.Translations ".Lang" . ) -}}
|
2019-11-06 15:53:52 +00:00
|
|
|
{{- $p := (index . 0) -}}
|
|
|
|
{{- $pages = $pages | lang.Merge ($p.Resources.ByType "page") -}}
|
|
|
|
{{- end -}}
|
2019-07-14 10:41:04 +00:00
|
|
|
{{ end }}
|
|
|
|
{{- $.Scratch.Set "glossary_items" $pages -}}
|
2018-10-01 19:38:37 +00:00
|
|
|
{{- else -}}
|
2019-02-05 16:33:23 +00:00
|
|
|
{{- errorf "[%s] Glossary Bundle not found for language. Create at least an index.md file inside docs/reference/glossary" site.Language.Lang -}}
|
2018-10-01 19:38:37 +00:00
|
|
|
{{- end -}}
|