show all pages for first language
This commit is contained in:
parent
8deaaf2d04
commit
0654046820
|
@ -24,10 +24,17 @@
|
|||
</div>
|
||||
{{- end }}
|
||||
|
||||
|
||||
{{- $pages := .Pages }}
|
||||
|
||||
{{- if .IsHome }}
|
||||
{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
|
||||
{{/* first language is the main language, get all pages */}}
|
||||
{{- if (eq site.Language (index site.Languages 0)) }}
|
||||
{{- $pages = where site.AllPages "Kind" "page" }}
|
||||
{{- else }}
|
||||
{{- $pages = site.RegularPages }}
|
||||
{{- end }}
|
||||
{{- $pages = where $pages "Type" "in" site.Params.mainSections }}
|
||||
{{- end }}
|
||||
|
||||
{{/* related issue: https://github.com/gohugoio/hugo/issues/9003 */}}
|
||||
|
|
Loading…
Reference in New Issue