Your sites Log in Sign up Menu

Ordering posts?

Is there a way to set the order of posts? Maybe be pre-fixing filenames or something like that?


23 days ago, 4 replies   developers   Improve this question

My understanding is that your posts are going to be ordered by date of publication. But you can set that in the metadata by including (for example) "Date: December 1, 2021" in the header of your post.

In other words, by backdating it, you can set the order.

Or if you want to schedule more than one per day, you can use the hour:minute format for the date and simply advance the date by one minute.

So:

12/1/2021 01:01 12/1/2021 01:02

I could be wrong about this, so if I am, I am happy to be corrected.

Answered 2 years ago · Improve this answer

You are correct that posts are ordered by date. I'm open to adding other methods of sorting posts but this is not yet implemented

Answered 2 years ago · Improve this answer

It would be great if it could order by last updated date. Any plans for adding that feature? Or is there a workaround ?

Answered 24 days ago · Improve this answer

I want to add support for ordering by path, updated date, publish date. I'm just unsure how to add this. Should it be a global setting on the dashboard? Should it be handled within the template source code? If so, what syntax for the template? Perhaps a new tag, e.g.

{{#posts-sorted-by-updated}}
...
{{/posts-sorted-by-updated}}

Or a new setting in package.json, e.g.

"sort": "updated"

My intuition is that this is best handled at the template-level, rather than a global setting. What are your thoughts?

Answered 23 days ago · Improve this answer