Skip to content

Sort collections#272

Merged
mmistakes merged 3 commits intommistakes:masterfrom
cyberang3l:sort-collections
Mar 12, 2018
Merged

Sort collections#272
mmistakes merged 3 commits intommistakes:masterfrom
cyberang3l:sort-collections

Conversation

@cyberang3l
Copy link
Copy Markdown
Contributor

Added support for collection sorting. Updated README.md and fixed a typo in the _config.yml files.

The options sort_by and sort_order can be added in the front matter. Accepted values for The sort_by
option are the 'title' and 'date', and for the sort_order option is the 'reverse' (anything else will provide a forward ordering).

Example reverse sorting of recipes based on title:


title: Recipes
layout: collection
permalink: /recipes/
collection: recipes
show_excerpts: false
sort_by: title
sort_order: reverse
entries_layout: list

The options sort_by and sort_order can be added in
the front matter. Accepted values for The sort_by
option are the 'title' and 'date', and for the
sort_order option is the 'reverse'.

Example reverse sorting of recipes based on title:

---
title: Recipes
layout: collection
permalink: /recipes/
collection: recipes
show_excerpts: false
sort_by: title
sort_order: reverse
entries_layout: list
---

Signed-off-by: Vangelis Tasoulas <vangelis@tasoulas.net>
Signed-off-by: Vangelis Tasoulas <vangelis@tasoulas.net>
Signed-off-by: Vangelis Tasoulas <vangelis@tasoulas.net>
@mmistakes
Copy link
Copy Markdown
Owner

Thanks, this looks good!

@mmistakes mmistakes merged commit b7f81cf into mmistakes:master Mar 12, 2018
@cyberang3l cyberang3l deleted the sort-collections branch March 12, 2018 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants