I want to list a collection by date. I believe I have followed the docs http://learn.getgrav.org/content/collections but the output is not ordered by date.
I have set up:
content:
items: '@self.children'
order:
by: date
dir: asc
Instances look like this:
title: Pride and Prejudice
author: Jane Austen
date: 1813
The template lists the items in the page collection in the usual way:
{% for child in page.collection %}
<li>
<a href="{{ child.route }}">{{ child.title }}</a>
{{ child.header.author }} {{ child.header.date }}
</li>
{% endfor %}
The items are listed in an order that I don't understand, but it's certainly not date order. Nor is it random, because if I change asc to desc I get the same order reversed.
Anyone know what I'm doing wrong?