diff --git a/_includes/layouts/post.njk b/_includes/layouts/post.njk index 27d6e20..4d7327c 100644 --- a/_includes/layouts/post.njk +++ b/_includes/layouts/post.njk @@ -12,6 +12,7 @@ templateClass: tmpl-post {{ content | safe }} +{%- if collections.posts %} {%- set nextPost = collections.posts | getNextCollectionItem(page) %} {%- set previousPost = collections.posts | getPreviousCollectionItem(page) %} {%- if nextPost or previousPost %} @@ -21,3 +22,4 @@ templateClass: tmpl-post {%- if previousPost %}
  • Previous: {{ previousPost.data.title }}
  • {% endif %} {%- endif %} +{%- endif %}