From e3a1454b23780da29819c8f6ac7adda11aa5b734 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Sat, 29 Sep 2018 18:42:35 -0400 Subject: publish mr-worldwide pt 1, and add next/previous in series links --- _layouts/post.html | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) (limited to '_layouts/post.html') diff --git a/_layouts/post.html b/_layouts/post.html index 7d74c5d..86456f8 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -1,7 +1,7 @@ --- layout: default --- -
+

@@ -26,8 +26,47 @@ layout: default

+ {% if page.series %} + {% assign foundThis = false %} + {% for post in site.posts reversed %} + {% if post.series == page.series %} + {% if post.url == page.url %} + {% assign foundThis = true %} + {% elsif foundThis %} + {% assign next = post %} + {% break %} + {% else %} + {% assign prev = post %} + {% endif %} + {% endif %} + {% endfor %} + {% if prev or next %} +

+ This post is part of a series
+ {% if prev %} + Previously: {{ prev.title }}
+ {% endif %} + {% if next %} + Next: {{ next.title }}
+ {% endif %} +

+ {% endif %} + {% endif %} +
{{ content }}
+ {% if prev or next %} +

+ This post is part of a series
+ {% if prev %} + Previously: {{ prev.title }}
+ {% endif %} + {% if next %} + Next: {{ next.title }}
+ {% endif %} +

+ {% endif %} +
-- cgit v1.2.3