From 792ecfa3107daf1086df1558a2662b0d8d40cb20 Mon Sep 17 00:00:00 2001 From: HTeuMeuLeu Date: Sun, 5 Apr 2020 16:50:46 +0200 Subject: [PATCH] Add version badge for Custom Sorting of Documents (#8098) Merge pull request 8098 --- docs/_docs/collections.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/_docs/collections.md b/docs/_docs/collections.md index 9e4ea995..5985c0b6 100644 --- a/docs/_docs/collections.md +++ b/docs/_docs/collections.md @@ -129,7 +129,8 @@ You can link to the generated page using the `url` attribute: There are special [permalink variables for collections]({{ '/docs/permalinks/' | relative_url }}) to help you control the output url for the entire collection. -## Custom Sorting of Documents +## Custom Sorting of Documents {%- include docs_version_badge.html version="4.0" -%} +{: #custom-sorting-of-documents} 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.