minicomp / ed

A Jekyll theme for minimal editions :book:
https://minicomp.github.io/ed/
Other
246 stars 128 forks source link

Ordering of posts #18

Closed kHarshit closed 4 years ago

kHarshit commented 4 years ago

Hi, I want the posts to display in the same order as they were posted (chronologically), not alphabetically. How do I do that? e.g. https://kharshit.github.io/poems/

https://github.com/minicomp/ed/blob/bed1af9ecf422b3fbefcba43da75eb991dbfbf83/_includes/sidebar.html#L21

Removing sort: "url" didn't help!

kHarshit commented 4 years ago

Update: Adding sort: "date" and date field to posts (texts) sorted the posts chronologically.

something like this:

---
layout: poem
date: 2010-11-15 20:19 +05:30
---

Now, the posts are in chronological order though I want them to be reversed, it doesn't work even if add reversed.

{% for node in pages_list reversed %}
karlstolley commented 4 years ago

@kHarshit you'll want to read through the Jekyll docs to help you understand how to set the sorting of your collections. You're referencing site.pages, which is different from a custom collection: https://jekyllrb.com/docs/collections/#custom-sorting-of-documents