Home

Posts are now sorted by date

2023-01-28T17:43:00.000+01:00

The first idea was to just sort them by creation date, however, that might not be great. Post might be created and left in draft status for a while, and then should be on top of the list once they are ready. Because of that, I added a new date field to the table on which the posts are sorted on.

It’s a little unfortunate to have a required field on the database that I have to remember to add in order to make posts work, but that is already the case with the ‘published/draft’ tags, so I think it’s fine.

Also added a fallback should the value not be provided. In that case, the post should be ordered at the very bottom with a published date of January 1970.