From 664f5fc3f5ba85b0ac46eae49d17cb605cabb82e Mon Sep 17 00:00:00 2001
From: Bud Parr <budparr@gmail.com>
Date: Tue, 11 Apr 2017 13:13:12 +0000
Subject: [PATCH] add pagination and first after examples wip
---
layouts/section/article.html | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/layouts/section/article.html b/layouts/section/article.html
index 3fd9a08..706ea6c 100644
--- a/layouts/section/article.html
+++ b/layouts/section/article.html
@@ -1,13 +1,17 @@
{{ define "main" }}
- {{ $section := where .Data.Pages "Section" .Section }}
+
<article class="pa3 pa4-ns nested-copy-line-height nested-img">
+
<div class="{{ .Site.Params.copyClass }}">
{{ .Content }}
</div>
+
+ {{ $section := .Paginate (where .Data.Pages "Section" .Section) 5 }}
<section class="flex-ns flex-wrap justify-around mt5">
- {{ range sort $section "Date" "desc" }}
+ {{ range sort $section.Pages "Date" "desc" }}
{{ .Render "summary" }}
{{ end }}
</section>
+
</article>
{{ end }}
--
Gitblit v1.10.0