---
title: Creating a simple archive for posts in Jekyll
date: 2015-03-11
published: 2015-03-11
tags: ['technology', 'javascript', 'jekyll']
description: "A minimal Liquid snippet for generating a chronological post archive in Jekyll."
references:
  - '/posts/migrating-to-jekyll/'
  - '/posts/migrating-to-gitlab/'
---

Because Jekyll parses markdown when generating your static site, you can use Liquid template variables to create a simple archive of all posts.

The approach is to iterate over all posts and output their variables. This creates an ordered list of all published posts:

```liquid
{% for post in site.posts %}
{{ post.date | date: "%B %d, %Y" }}: <a href="{{ post.url }}">{{ post.title }}</a>
{% endfor %}
```

This loops through all posts, formatting each entry with the publication date followed by a linked post title. The date filter renders dates in "Month DD, YYYY" format.
