Skip to content

Instantly share code, notes, and snippets.

@lukecathie
Created December 18, 2014 09:36
Show Gist options
  • Select an option

  • Save lukecathie/2b4eaad90467b3a7c266 to your computer and use it in GitHub Desktop.

Select an option

Save lukecathie/2b4eaad90467b3a7c266 to your computer and use it in GitHub Desktop.
Jekyll sort collections by date desc
{% 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 %}
@garraflavatra

Copy link
Copy Markdown

thanks!

@leedh

leedh commented Jan 7, 2022

Copy link
Copy Markdown

Thank you! Helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment