--- layout: layouts/home.njk eleventyNavigation: key: Home order: 1 numberOfLatestPostsToShow: 10 --- {% set postsCount = collections.posts | length %} {% set latestPostsCount = postsCount | min(numberOfLatestPostsToShow) %} {% set postslist = collections.posts | head(-1 * numberOfLatestPostsToShow) %} {% set postslistCounter = postsCount %} {% include "postslist.njk" %} {% set morePosts = postsCount - numberOfLatestPostsToShow %} {% if morePosts > 0 %} <p>See {{ morePosts }} more post{% if morePosts != 1 %}s{% endif %} in <a href="/blog/">the blog</a>.</p> {% endif %} {# List every content page in the project #} {# <ul> {%- for entry in collections.all %} <li><a href="{{ entry.url }}"><code>{{ entry.url }}</code></a></li> {%- endfor %} </ul> #}