From 819b0dc373f97342f401892aceba183a06e4621e Mon Sep 17 00:00:00 2001 From: panr Date: Sun, 25 Aug 2019 09:34:00 +0200 Subject: [PATCH] Fix list.html #87 --- layouts/_default/list.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 43eaa3f..290b02f 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -2,7 +2,12 @@
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }} {{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }} - {{ $paginator := .Paginate (where .Site.RegularPages "Type" $contentTypeName) }} + + {{ $PageContext := . }} + {{ if .IsHome }} + {{ $PageContext = .Site }} + {{ end }} + {{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }} {{ range $paginator.Pages }}