Add version badge for Custom Sorting of Documents (#8098)

Merge pull request 8098
This commit is contained in:
HTeuMeuLeu 2020-04-05 16:50:46 +02:00 committed by GitHub
parent 3c41a1eb1d
commit 792ecfa310
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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 There are special [permalink variables for collections]({{ '/docs/permalinks/' | relative_url }}) to
help you control the output url for the entire collection. 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. 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.