Made an All Posts Page
- In
howto.md changed the front matter from navigation order 2 to 3.
- In
/layouts, made blog.njk and copied base.njk into the new layout.
- In
/src made blog.md with front matter:
---
title: All Posts
layout: /layouts/blog
eleventyNavigation:
key: All Posts
order: 2
---
- Added all posts to
blog.njk with this code:
<h2>✍️ All Posts</h2>
{% for posts in collections.myPostsReverse %}
<article>
<strong>{{ posts.data.date | correctISO }} — <a href="{{ posts.url }}">{{ posts.data.title }}</a></strong><br>
<em>{{ posts.data.blurb }}</em><br>
Tags: {% for tags in posts.data.tags | filterTagList | sortTags %}<a href="/tags/{{ tags | slug }}">{{ tags }}</a>{% if not loop.last %}, {% endif %}
{% endfor %}
</article>
{% endfor %}