Just found this weird behavior of different browsers...
Had problems sorting posts by date in Firefox, but Chrome worked alright.
Apparently firefox didn't understand dates in format 11-02-2021, but needed 11/02/2021.
Read more
Just found this weird behavior of different browsers...
Had problems sorting posts by date in Firefox, but Chrome worked alright.
Apparently firefox didn't understand dates in format 11-02-2021, but needed 11/02/2021.
This is my Fourth blog post.
Added some About me data, and sorting by created date. Newest posts at the top.
Blow is the code that executes sorting:
data.allMarkdownRemark.edges
.sort((a, b) => {
const aDate = new Date(a.node.frontmatter.date);