Pray this works
This commit is contained in:
parent
3f032510f0
commit
547cf0665f
1 changed files with 3 additions and 3 deletions
6
blog.js
6
blog.js
|
@ -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
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue