Fixed blog sorting, removed old code

This commit is contained in:
Tim Stallard 2016-11-04 22:35:09 +00:00
parent 5522555aa2
commit 532a5f9d6f

View File

@ -7,7 +7,7 @@ var docpadConfig = {
return this.getCollection("html").findAllLive({relativeOutDirPath: "."}, [{order: 1}]); return this.getCollection("html").findAllLive({relativeOutDirPath: "."}, [{order: 1}]);
}, },
posts: function(){ posts: function(){
var posts = this.getCollection("html").findAllLive({relativeOutDirPath: "blog"}); var posts = this.getCollection("html").findAllLive({relativeOutDirPath: "blog"}, [{date: -1}]);
posts.on("add", function(post){ posts.on("add", function(post){
post.setMetaDefaults({ post.setMetaDefaults({
layout: "blogpost" layout: "blogpost"
@ -41,13 +41,6 @@ var docpadConfig = {
livereload: { livereload: {
enabled: true enabled: true
} }
},
templateData: {
site: {
scripts: [
]
}
}, },
events: { events: {
populateCollections: function(){ populateCollections: function(){