--- eleventyNavigation: key: Home order: 1 numberOfLatestPostsToShow: 3 --- {% set postsCount = collections.posts | length %} {% set latestPostsCount = postsCount | min(numberOfLatestPostsToShow) %}

Latest {{ latestPostsCount }} Post{% if latestPostsCount != 1 %}s{% endif %}

{% set postslist = collections.posts | head(-1 * numberOfLatestPostsToShow) %} {% set postslistCounter = postsCount %} {% include "postslist.njk" %} {% set morePosts = postsCount - numberOfLatestPostsToShow %} {% if morePosts > 0 %}

{{ morePosts }} more post{% if morePosts != 1 %}s{% endif %} can be found in the archive.

{% endif %} {# List every content page in the project #} {# #}