Skip to content

Commit

Permalink
update posts to canonically be sorted alphabetically
Browse files Browse the repository at this point in the history
  • Loading branch information
cesque committed Mar 22, 2024
1 parent b821669 commit 3999fa9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils/getPosts.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export default async function getPosts() {
})
}

posts.sort((a, b) => Date.parse(b.info.created) - Date.parse(a.info.created))
// sorting by date doesn't really work because the files are always brand new on vercel server
// posts.sort((a, b) => Date.parse(b.info.created) - Date.parse(a.info.created))
posts.sort((a, b) => a.slug.localeCompare(b.slug))

let tags = [...new Set(posts.map(post => post.meta.tags).flat())]

Expand Down

0 comments on commit 3999fa9

Please sign in to comment.