gilbitron/Pico — pull request #50 by atajsic (2013-07-24 01:05:48+00:00)
Title: Update pico.php

This is only a suggestion and could be expanded and changed but for my project and what I'm working on this seemed good enough.

Essentially this allows the possibility for the Date: meta field within the markdown content files to be written in various ways which will all be converted to ISO YYYY-MM-DD-ID before being sorted. This should also in theory speed up the process on much larger sites.

Additionally, I've changed how files without a date are sorted within the array: by the date the page was last modified.

So essentially the logic goes:

if meta.date then meta.date else page.modified > sort

This could be expanded to allow the date modified to be read by the date_formatted or what have you, however it could break some people's sites whereby they utilise various data attribute within twig. Though one would assume they would be doing this on the date meta identifier.

Anyhow, food for thought.

- Andrew
:)