Closed cuibonobo closed 2 years ago
It might help to save deterministic JSON so that the files don't reflect insertion order.
It might be good to write a script to make all existing JSON data in the project deterministic.
I'm now realizing that the display of items on the site is determined by these non-deterministic JSON objects. Instead of being a dictionary, the latest
index should be a list that shows posts in reverse chronological order. Anything that is using the latest
index to get the content of a post based on its ID should instead read directly from the posts
directory. This means you no longer need the type to retrieve a post object.
When the index is built from scratch, new posts are added to the top of
latest.json
. If a post is added to an existing index, it's added to the bottom.