Skip to Content
Non-starter

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
---

http://localhost:8080/blog/

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
  1. Tutorial
  2. Create a Home Page
  3. Add Some Style
  4. Make Your First Blog Post
  5. Create a Blog Archive
  6. Site-wide Navigation
  7. Add Recent Posts to Home Page
  8. Add an RSS Feed
  9. Add an About Page
  10. What’s Next?