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}]);
},
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){
post.setMetaDefaults({
layout: "blogpost"
@ -42,13 +42,6 @@ var docpadConfig = {
enabled: true
}
},
templateData: {
site: {
scripts: [
]
}
},
events: {
populateCollections: function(){
this.docpad.blocks["scripts"].add([