summaryrefslogtreecommitdiff
path: root/_layouts/post.html
diff options
context:
space:
mode:
Diffstat (limited to '_layouts/post.html')
-rw-r--r--_layouts/post.html41
1 files changed, 40 insertions, 1 deletions
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
---
-<article itemscope itemtype="http://schema.org/BlogPosting">
+<article itemscope itemtype="http://schema.org/BlogPosting" style="margin-bottom: 50vh;">
<header id="post-header">
<h1 id="post-headline" itemprop="name headline">
@@ -26,8 +26,47 @@ layout: default
</div>
</header>
+ {% 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 %}
+ <p class="light"><em>
+ This post is part of a series<br/>
+ {% if prev %}
+ Previously: <a href="{{ prev.url | relative_url }}">{{ prev.title }}</a></br>
+ {% endif %}
+ {% if next %}
+ Next: <a href="{{ next.url | relative_url }}">{{ next.title }}</a></br>
+ {% endif %}
+ </em></p>
+ {% endif %}
+ {% endif %}
+
<div id="post-content" itemprop="articleBody">
{{ content }}
</div>
+ {% if prev or next %}
+ <p class="light"><em>
+ This post is part of a series<br/>
+ {% if prev %}
+ Previously: <a href="{{ prev.url | relative_url }}">{{ prev.title }}</a></br>
+ {% endif %}
+ {% if next %}
+ Next: <a href="{{ next.url | relative_url }}">{{ next.title }}</a></br>
+ {% endif %}
+ </em></p>
+ {% endif %}
+
</article>