From 2b9088cff62211e6f88a8f9b724090d7bd293fb6 Mon Sep 17 00:00:00 2001 From: nanxiaobei Date: Thu, 16 Jan 2020 03:24:22 +0800 Subject: [PATCH] update pages source --- layouts/_default/list.html | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 4c84589..f734ee9 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,18 +1,14 @@ {{ partial "header.html" . }} -{{ $pctx := . }} -{{ if .IsHome }} -{{ $pctx = .Site }} -{{ else }} +{{ if not .IsHome }} {{ end }} -{{ $paginator := .Paginate (where $pctx.RegularPages "Type" "in" .Site.Params.mainSections) }} +{{ $paginator := .Paginate (where .Site.RegularPages ".Params.type" "!=" "page") }} -{{ if gt $paginator.TotalPages 0 }} {{ range $index, $page := $paginator.Pages }}
@@ -27,7 +23,6 @@
{{ end }} -{{ end }} {{ if gt $paginator.TotalPages 1 }}