More homepage work, show recent posts

This commit is contained in:
Lewis Dale committed 2023-02-08 09:29:44 +00:00
1 parent c12d926f01
commit b10856ab6c
9 files changed
+82 -10

No files matched your search

+8 -2
View File
@@ -20,9 +20,15 @@ layout: base.njk
</p>
</section>
<section>
<section class="stack-md">
<h2>Recent Posts</h2>
<a href="/blog">View more posts</a>
<ul class="stack-2xs">
{% for post in collections.posts.slice(0, 3) %}
<li><a href="{{ post.data.url }}">{{ post.data.title }}</a> <time>{{ post.date | dateDisplay }}</time></li>
{% endfor %}
</ul>
<a href="/blog" class="block">View more posts</a>
</section>
</main>