Skip to content

Commit 2a53c5e

Browse files
committed
fix(flat-pages): prevent appending redirect pages to the list
1 parent 37903cb commit 2a53c5e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

layouts/partials/flat-pages.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
{{- $pages := slice -}}
22

33
{{- range (where .Section.Pages "Params.hidden" "ne" true) -}}
4-
{{- $pages = $pages | append . -}}
4+
{{- $isRedirect := or (isset .Params "redirect") (eq .Params.layout "redirect") -}}
5+
6+
{{- if not $isRedirect -}}
7+
{{- $pages = $pages | append . -}}
8+
{{- end -}}
9+
510
{{- if .IsSection -}}
611
{{- $subPages := partial "flat-pages" (dict "Section" .) -}}
712
{{- $pages = $pages | append $subPages -}}

0 commit comments

Comments
 (0)