1
0
Fork 0

Merge pull request #6045 from BenJamesBen/blog-chronological-navigation

fix(shared): Blog navigation menu in reverse chronological order
This commit is contained in:
Joost De Cock 2024-02-13 18:47:20 +01:00 committed by GitHub
commit 76a4945b37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -167,7 +167,8 @@ const loadBlog = async () => {
for (const lang of Object.keys(titles)) {
posts[lang] = {}
for (const post of ordered) {
posts[lang][post.s] = { t: post.t }
const sortkey = 9999999999 - post.o
posts[lang][post.s] = { t: post.t, o: sortkey }
if (lang === 'en') meta[post.s] = { a: post.a, d: post.o }
}
}