Created
December 18, 2014 09:36
-
-
Save lukecathie/2b4eaad90467b3a7c266 to your computer and use it in GitHub Desktop.
Jekyll sort collections by date desc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% assign work_items = site.work_items | sort: 'date' | reverse %} | |
{% for work_item in work_items limit:4 %} | |
<div> | |
<a href="{{ work_item.url | prepend: site.baseurl }}">{{ work_item.title }}</a> | |
</div> | |
{% endfor %} |
Possible also to add weight. e.g., weight: 100
{% assign work_items = site.work_items | sort: 'weight' %}
👍
thanks!
Thanks!
thanks!
Thank you! Helpful
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👍