Adds next and previous post links.
This commit is contained in:
parent
75e71adb29
commit
61885752b6
@ -6,4 +6,10 @@ templateClass: tmpl-post
|
|||||||
|
|
||||||
{{ content | safe }}
|
{{ content | safe }}
|
||||||
|
|
||||||
<p><a href="{{ '/' | url }}">← Home</a></p>
|
<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>
|
||||||
|
Loading…
Reference in New Issue
Block a user