Pray this works

This commit is contained in:
bingus_violet 2024-07-07 23:27:13 -05:00
parent 3f032510f0
commit 547cf0665f

View file

@ -13,6 +13,7 @@ const defaultConfig = {
module.exports = {
blogPosts: () => {
var posts = []
var pinned = []
var dir = fs.readdirSync(paths.posts)
dir.sort(function(a, b) {
@ -39,14 +40,13 @@ module.exports = {
}
if (config.pinned) {
posts.push(config)
pinned.unshift(config)
} else {
posts.unshift(config)
}
}
}
posts.reverse()
return posts
return pinned + posts
}
}