Skip to content

Commit f8be009

Browse files
adlerzeichalin
authored andcommitted
Fix section index for home pages of docs-only sites
1 parent 09b9a9f commit f8be009

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

layouts/_partials/section-index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
<div class="section-index">
22
{{ $page := .Page -}}
3-
{{ $pages := (where .Site.Pages "Section" .Section).ByWeight -}}
3+
{{ $pages := .Site.Pages.ByWeight -}}
4+
{{ if .Section -}}
5+
{{ $pages = (where $pages "Section" .Section) -}}
6+
{{ end -}}
47
{{ $pages = (where $pages "Type" "!=" "search") }}
58
{{ $pages = (where $pages ".Params.hide_summary" "!=" true) -}}
9+
{{ $pages = (where $pages ".Kind" "!=" "taxonomy") -}}
610
{{ $pages = (where $pages ".Parent" "!=" nil) -}}
711
{{ $pages = (where $pages ".Parent.File" "!=" nil) -}}
812
{{ if $page.File -}}

0 commit comments

Comments
 (0)