feat: created index pages for posts and recipes
This commit is contained in:
parent
f93207b4e3
commit
0d5bb62775
4 changed files with 110 additions and 16 deletions
26
posts-index.njk
Normal file
26
posts-index.njk
Normal 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 %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue