timstallard.me.uk/docpad.js

39 lines
795 B
JavaScript
Raw Normal View History

2016-01-07 10:25:27 +00:00
// DocPad Configuration File
// http://docpad.org/docs/config
var docpadConfig = {
collections: {
pages: function(){
return this.getCollection("html").findAllLive({relativeOutDirPath: "."}, [{order: 1}]);
},
posts: function(){
return this.getCollection("html").findAll({relativeOutDirPath: "blog"});
},
projects: function(){
var projects = this.getCollection("html").findAllLive({relativeOutDirPath: "projects"});
projects.on("add", function(model){
model.setMetaDefaults({
layout: "contentpage"
2016-01-07 10:25:27 +00:00
});
});
return projects;
2016-01-07 10:25:27 +00:00
}
},
plugins: {
cleanurls: {
static: true
},
moment: {
formats: [
{
raw: "date",
format: "MMMM Do, YYYY",
formatted: "formattedDate"
}
]
}
2016-01-07 10:25:27 +00:00
}
}
module.exports = docpadConfig;