Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ribice/kiss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmir Ribic <ribice@gmail.com>2019-08-20 08:55:09 +0300
committerEmir Ribic <ribice@gmail.com>2019-08-20 08:55:09 +0300
commit7ea314718385eb5f0e0de71865588e6ef834a075 (patch)
tree299a9b83b1fa39564c1455af266501c8ee381b7e
parent925ce982d67456650904fed3279026691b3a76b1 (diff)
Update per comments for hugo #682
-rw-r--r--exampleSite/config.toml1
-rw-r--r--layouts/index.html9
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 }}