11ty

Eleventy Documentation

This documentation is for an older version. Go to the newest Eleventy docs or check out the full release history.

Documentation Pages

Content Dates #

Setting a Content Date in Front Matter #

Add a date key to your front matter to override the default date (file creation) and customize how the file is sorted in a collection.

---
date: 2016-01-01
---
---
date: Last Modified
---

Valid date values:

If a date key is omitted from the file, the date is assumed to be:

  1. If the file name has a YYYY-MM-DD format (anywhere), this date is used.
  2. File creation date.
Running Eleventy on a Continuous Integration Server? Your collections may appear out of order! See Common Pitfalls.