From 1c50bcc7ec7f0c6d23cb8194d42ede364c48eb99 Mon Sep 17 00:00:00 2001 From: Jose Valecillos Date: Fri, 16 Aug 2019 17:32:03 +0200 Subject: [PATCH 1/2] Adjusted post list for Hugo v0.57.0 --- layouts/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/index.html b/layouts/index.html index c500765..003f4d9 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -4,7 +4,7 @@ {{ define "content" }}
- {{ $paginator := .Paginate (where .Data.Pages "Type" "posts") }} + {{ $paginator := .Paginate (where .Site.RegularPages "Type" "posts") }} {{ range $paginator.Pages }} {{ if .Draft }} {{ .Scratch.Set "draftPage" true }} From 350fe18188c01564ca83bd8e500b7837fcae0e3d Mon Sep 17 00:00:00 2001 From: Jose Valecillos Date: Sun, 18 Aug 2019 13:18:36 +0200 Subject: [PATCH 2/2] Using site.Params.mainSections for listing posts --- layouts/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/index.html b/layouts/index.html index 003f4d9..c1a00bb 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -4,7 +4,7 @@ {{ define "content" }}
- {{ $paginator := .Paginate (where .Site.RegularPages "Type" "posts") }} + {{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" site.Params.mainSections) }} {{ range $paginator.Pages }} {{ if .Draft }} {{ .Scratch.Set "draftPage" true }}