aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÓscar Nájera <hello@oscarnajera.com>2018-07-15 04:53:07 +0200
committerÓscar Nájera <hello@oscarnajera.com>2018-07-15 04:53:07 +0200
commitf32442d10052821726204ad95585882aa1807d77 (patch)
treeee82e418405c06d09ccd21ca32556abc61848e91
parent562b4dda0bcf97aab6486ebcc828cb54b5434ccd (diff)
downloadhugo-minimalist-theme-f32442d10052821726204ad95585882aa1807d77.tar.gz
hugo-minimalist-theme-f32442d10052821726204ad95585882aa1807d77.tar.bz2
hugo-minimalist-theme-f32442d10052821726204ad95585882aa1807d77.zip
starting pagination
-rw-r--r--layouts/index.html5
-rw-r--r--layouts/partials/footer.html2
2 files changed, 4 insertions, 3 deletions
diff --git a/layouts/index.html b/layouts/index.html
index 172e87a..5d3350c 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -2,8 +2,9 @@
<div id="content" class="mw7 center">
<!-- Note that .Data.Pages is the equivalent of .Site.Pages on the homepage template. -->
-
- {{ range where .Data.Pages "Section" "post" }}
+ {{ $paginator := .Paginate (where .Data.Pages "Section" "post") }}
+ {{ partial "pagination.html" . }}
+ {{ range $paginator.Pages }}
{{ .Render "summary" }}
{{ end }}
</div>
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 992a65d..b4df1c4 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,4 +1,4 @@
-<footer id="footer" class="mw7 center mb3">
+<footer id="footer" class="mw7 center mv3">
<span class="db tc black-60">
&copy; {{ now.Format "2006" }} {{ with .Site.Params.footer.copyright }}{{ . | safeHTML }}{{ else }}{{ with .Site.Author.name }}{{ . }}{{ else }}{{ with .Site.Title }}{{ . }}{{ end }}{{ end }}{{ end }}. All Rights Reserved
</span>