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

github.com/hauke96/hugo-theme-hamburg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwhchi <whchi@users.noreply.github.com>2020-01-16 07:27:03 +0300
committerGitHub <noreply@github.com>2020-01-16 07:27:03 +0300
commitf7ab30b4c67273b332a7b6828a029252a62dac6c (patch)
tree784d3e84ac08ff8355ea59cfdf9721cd910825fb
parent3368d9906647a1c090d4e070b6c8d74868af06cb (diff)
fix pagination not working issue
-rw-r--r--layouts/index.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/layouts/index.html b/layouts/index.html
index f24966c..65d8284 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,6 +1,7 @@
{{ partial "header.html" . }}
<div class="article-list">
- {{ range $index, $page := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
+ {{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
+ {{ range $index, $page := $paginator.Pages }}
{{ if ne $index 0 }}
<div class="delimiter"></div>
{{ end }}