Document sorting two documents by their `date` (#7870)

Merge pull request 7870
This commit is contained in:
Ben Stolovitz 2020-02-03 09:08:07 -08:00 committed by GitHub
parent b98a919351
commit 7cac1f9096
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -129,7 +129,9 @@ help you control the output url for the entire collection.
## Custom Sorting of Documents
By default, documents in a collection are sorted by their paths. But you can control this sorting via the collection's metadata.
By default, two documents in a collection are sorted by their `date` attribute when both of them have the `date` key in their front matter. However, if either or both documents do not have the `date` key in their front matter, they are sorted by their respective paths.
You can control this sorting via the collection's metadata.
### Sort By Front Matter Key