From f32442d10052821726204ad95585882aa1807d77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Sun, 15 Jul 2018 04:53:07 +0200 Subject: starting pagination --- layouts/index.html | 5 +++-- layouts/partials/footer.html | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'layouts') 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 @@
- - {{ range where .Data.Pages "Section" "post" }} + {{ $paginator := .Paginate (where .Data.Pages "Section" "post") }} + {{ partial "pagination.html" . }} + {{ range $paginator.Pages }} {{ .Render "summary" }} {{ end }}
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 @@ -