From 7ea314718385eb5f0e0de71865588e6ef834a075 Mon Sep 17 00:00:00 2001 From: Emir Ribic Date: Tue, 20 Aug 2019 07:55:09 +0200 Subject: Update per comments for hugo #682 --- exampleSite/config.toml | 1 - layouts/index.html | 9 +++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 72017f1..cf5546e 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -8,7 +8,6 @@ googleAnalytics = "" # Number of posts per page Paginate = 5 enableRobotsTXT = true -mainSections = ["post"] [params.features] disqusOnDemand = true # Load Disqus comments on click diff --git a/layouts/index.html b/layouts/index.html index 31a68be..d5e2c03 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -2,12 +2,9 @@ {{ partial "nav" . }}
- {{ $pages := .Pages }} - {{ if .IsHome }} - {{ $pages = .Site.RegularPages }} - {{ end }} - {{ $paginator := .Paginate $pages }} - {{ range .Paginator.Pages }} + {{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} + {{ $paginator := .Paginate (where $pages "Params.hidden" "ne" true) }} + {{ range $paginator.Pages }}
{{ if .Params.tags }} -- cgit v1.2.3