xmitter-11ty/content/index.njk

28 lines
840 B
Plaintext
Raw Normal View History

2023-01-23 11:02:06 -05:00
---
eleventyNavigation:
key: Home
order: 1
numberOfLatestPostsToShow: 3
2023-01-23 11:02:06 -05:00
---
{% set postsCount = collections.posts | length %}
{% set latestPostsCount = postsCount | min(numberOfLatestPostsToShow) %}
2023-01-23 11:02:06 -05:00
<h1>Latest {{ latestPostsCount }} Post{% if latestPostsCount != 1 %}s{% endif %}</h1>
{% set postslist = collections.posts | head(-1 * numberOfLatestPostsToShow) %}
2023-01-23 11:02:06 -05:00
{% set postslistCounter = postsCount %}
{% include "postslist.njk" %}
{% set morePosts = postsCount - numberOfLatestPostsToShow %}
{% if morePosts > 0 %}
2024-02-12 10:19:30 -05:00
<p>{{ morePosts }} more post{% if morePosts != 1 %}s{% endif %} can be found in <a href="blog.njk">the archive</a>.</p>
2023-01-23 11:02:06 -05:00
{% endif %}
{# List every content page in the project #}
{#
<ul>
2023-01-23 12:37:44 -05:00
{%- for entry in collections.all %}
<li><a href="{{ entry.url }}"><code>{{ entry.url }}</code></a></li>
{%- endfor %}
2023-01-23 11:02:06 -05:00
</ul>
#}