diff options
-rw-r--r-- | exampleSite/config.toml | 1 | ||||
-rw-r--r-- | 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" . }} <section class="section"> <div class="container"> - {{ $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 }} <article> <div class="subtitle tags is-6 is-pulled-right"> {{ if .Params.tags }} |