Add next / previous cards to posts
This commit is contained in:
@ -17,14 +17,4 @@ layout: layouts/base.njk
|
||||
|
||||
{{ content | safe }}
|
||||
|
||||
{%- if collections.posts %}
|
||||
{%- set previousPost = collections.posts | getPreviousCollectionItem %}
|
||||
{%- set nextPost = collections.posts | getNextCollectionItem %}
|
||||
{%- if nextPost or previousPost %}
|
||||
<ul class="links-nextprev">
|
||||
{%- if previousPost %}<li>Previous: <a href="{{ previousPost.url }}">{{ previousPost.data.title }}</a></li>{% endif %}
|
||||
{%- if nextPost %}<li>Next: <a href="{{ nextPost.url }}">{{ nextPost.data.title }}</a></li>{% endif %}
|
||||
</ul>
|
||||
<p>Questions? Comments? <a href="../../me">contact me</a>.</p>
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{% include "nextLast.njk" %}
|
||||
|
Reference in New Issue
Block a user