feat: created index pages for posts and recipes

This commit is contained in:
Leyla Becker 2026-02-12 15:10:58 -06:00
parent f93207b4e3
commit 0d5bb62775
4 changed files with 110 additions and 16 deletions

26
posts-index.njk Normal file
View file

@ -0,0 +1,26 @@
---
layout: base.njk
title: All Blog Posts
description: All blog posts on Volpe.
permalink: /posts/
---
<h1>Blog Posts</h1>
{% if collections.posts.length > 0 %}
<ul class="post-list">
{% for post in collections.posts %}
<li>
<a href="{{ post.url }}" class="post-card">
<h2>{{ post.data.title }}</h2>
<time datetime="{{ post.data.createdAt | dateTimeFormat }}">{{ post.data.createdAt | dateTimeFormat }}</time>
{% if post.data.description %}
<p>{{ post.data.description }}</p>
{% endif %}
</a>
</li>
{% endfor %}
</ul>
{% else %}
<p>No blog posts yet.</p>
{% endif %}