Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort collections #272

Merged
merged 3 commits into from
Mar 12, 2018
Merged

Sort collections #272

merged 3 commits into from
Mar 12, 2018

Conversation

cyberang3l
Copy link
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 <[email protected]>
Signed-off-by: Vangelis Tasoulas <[email protected]>
@mmistakes
Copy link
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