Create a Blog Archive
Create the archive layout
---
layout: layouts/base.liquid
---
<h1>{{ title }}</h1>
<ul>
{% for post in collections.blog %}
<li><a href="{{ post.url }}">{{ post.data.title }}</a></li>
{% endfor %}
</ul>
Create the archive page
---
title: Blog
description: Archive of all posts from my blog.
layout: layouts/archive.liquid
---
Add all blog posts to the “blog” collection
{
"layout": "layouts/blog.liquid",
"tags": ["blog"]
}
Don’t forget the comma.
- Previous
- Make Your First Blog Post
- Next
- Site-wide Navigation