This commit is contained in:
Zach Leatherman
2021-03-17 10:29:29 -05:00
parent a9fdacc9a6
commit 7e5a1f5ce7
4 changed files with 34 additions and 30 deletions

View File

@ -6,10 +6,12 @@ templateClass: tmpl-post
{{ content | safe }}
{%- set nextPost = collections.posts | getNextCollectionItem(page) %}
{%- set previousPost = collections.posts | getPreviousCollectionItem(page) %}
{% if nextPost or previousPost %}
<hr>
<ul>
{%- set nextPost = collections.posts | getNextCollectionItem(page) %}
{%- if nextPost %}<li>Next: <a href="{{ nextPost.url | url }}">{{ nextPost.data.title }}</a></li>{% endif %}
{%- set previousPost = collections.posts | getPreviousCollectionItem(page) %}
{%- if previousPost %}<li>Previous: <a href="{{ previousPost.url | url }}">{{ previousPost.data.title }}</a></li>{% endif %}
</ul>
{% endif %}