How to order pages in a collection in reverse chronological order #2720
-
Hello, Is there a way to list the page cards under the projects collection in reverse chronological order? I know that I could use the importance: X option, but it is a bit tedious. When I add a new page, then I need to increase the number of importance parameter of all other pages to add a page to importance: 1. I also don't want to use the blog collection, since I would like to keep the categories in projects tab. So, is there any way to use the date of each project page to list them in reverse chronological order? Thanks in advance, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
By default, two documents in a collection are sorted by their al-folio/_includes/news.liquid Line 11 in bdf4ce3 |
Beta Was this translation helpful? Give feedback.
By default, two documents in a collection are sorted by their
date
attribute when both of them have thedate
key in their front matter, as written in the docs. Also, we already do sort a collection in an inverse order when generating the news part in the about page, so you just need to do the same for projects:al-folio/_includes/news.liquid
Line 11 in bdf4ce3