From be305fbae0c401e8c574e38105d500096161d387 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 20 Aug 2019 21:43:32 +1200 Subject: Switched to using RegularPages and mainSections More info here: https://github.com/gohugoio/hugoThemes/issues/682 --- layouts/_default/list.html | 5 +++-- layouts/partials/sidebar.html | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 04bef9a..e93d33a 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -79,8 +79,9 @@ {{ end }} {{ define "main" }}
- {{ $paginator := .Paginate (where (where .Pages "Type" "post") "Params.hidden" "!=" true) 10 }} - {{ range (.Paginator 10).Pages }} + {{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} + {{ $paginator := .Paginate (where $pages "Params.hidden" "ne" true) 10 }} + {{ range $paginator.Pages }}

{{ .Title }}

{{ partial "post-meta" . }} diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index efbfdd4..70afc2e 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -14,7 +14,7 @@ {{ end }}

Recent Posts

-- cgit v1.2.3