diff options
author | Brian Picciano <mediocregopher@gmail.com> | 2018-09-29 18:42:35 -0400 |
---|---|---|
committer | Brian Picciano <mediocregopher@gmail.com> | 2018-09-29 18:42:35 -0400 |
commit | e3a1454b23780da29819c8f6ac7adda11aa5b734 (patch) | |
tree | c876a0821df800bcbc627f4c0d114ae8d3b7ef02 /_layouts/post.html | |
parent | a21004025ce85089a8fff9a27f54574709069fee (diff) |
publish mr-worldwide pt 1, and add next/previous in series links
Diffstat (limited to '_layouts/post.html')
-rw-r--r-- | _layouts/post.html | 41 |
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> |