Use Aurora as a Blog

Aurora has out-of-the-box features designed for use with blogs.

Write a Blog Post

To use Aurora as a blog, create a markdown file with the following name structure in your pages/posts directory:

YYYY-MM-DD-title.md

For example, 2020-01-01-hello-world.md.

Within this file, you can specify front matter and, optionally, jinja2 templating.

Here is an example:

---
title: Hello, World!
layout: post
---

This is our first blog post.

This will be rendered as a blog post using the "pages/_layouts/post.html" file.

Aurora automatically turns your permalink into a URL. For example, the above file will be available at https://example.com/2020/01/01/hello-world/.

Categories and Tags

Aurora can automatically generate archive pages for categories and tags.

Categories and tags are treated as two separate collections.

To use this feature, you need to give at least one blog post a category or a tag, like so:

---
title: Hello, World!
layout: post
categories:
  - Announcement
---

This is our first blog post.

Categories and tags are not case-sensitive.

You then need to specify either a category or tag layout file, depending on which you want to support.

To do so, create a file called category.html or tag.html in your pages/_layouts directory.

This file will have access to a page.posts variable that lists all posts in the category or tag.

Here is an example of a category layout file:


---
layout: default
title: "Category Archive"
---

<ul>
    {% for post in page.posts %}
        <li>
            <a href="{{ post.url }}">{{ post.title }}</a>
        </li>
    {% endfor %}
</ul>

In this example, a page at /category/announcement/index.html will be generated.

Date Archives

Aurora can automatically generate date pages for categories and tags.

Date archives show all posts published on a specific day.

There is not currently support for month-based or year-based archives.

To use this feature, you need to have at least one blog post.

You then need to specify a date archive layout.

To do so, create a file called date.html in your pages/_layouts directory.

This file will have access to a page.posts variable that lists all posts published on a specific day.

Here is an example of a category layout file:


---
layout: default
title: "Date Archive"
---

<ul>
    {% for post in page.posts %}
        <li>
            <a href="{{ post.url }}">{{ post.title }}</a>
        </li>
    {% endfor %}
</ul>

In this example, a page at /2024/01/01/index.html will be generated, which lists one entry: the hello world post we wrote earlier in this guide.

Now you have a blog set up with Aurora! 🎉