How do you handle post ordering? Easiest I can think of is just prefixing every post filename with a date, but I don't really like adding meta data to the filename.
Another simple idea is adding the publication date as front matter and then sorting all posts when reading them. Might be a little slow though.
Yeah I think both methods would work! Agree that the first would be simplest. I've implemented the latter on the tinacms.org site for the blog index if you wanna check it out. You can also see the pagination implementation there so you only render a certain number of posts per page.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
How do you handle post ordering? Easiest I can think of is just prefixing every post filename with a date, but I don't really like adding meta data to the filename.
Another simple idea is adding the publication date as front matter and then sorting all posts when reading them. Might be a little slow though.
Any ideas?
Nice article!
Yeah I think both methods would work! Agree that the first would be simplest. I've implemented the latter on the tinacms.org site for the blog index if you wanna check it out. You can also see the pagination implementation there so you only render a certain number of posts per page.