---
layout: layouts/home.njk
eleventyNavigation:
  key: Home
  order: 1
numberOfLatestPostsToShow: 5
---
{% 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 %}
<a class="link-button" href="/blog/">
	<button type="button">
		See {{ morePosts }} more post{% if morePosts != 1 %}s{% endif %} in the blog
	</button>
</a>
{% endif %}
