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(){
|
2016-11-04 22:35:09 +00:00
|
|
|
var posts = this.getCollection("html").findAllLive({relativeOutDirPath: "blog"}, [{date: -1}]);
|
2016-09-03 17:47:02 +01:00
|
|
|
posts.on("add", function(post){
|
|
|
|
post.setMetaDefaults({
|
|
|
|
layout: "blogpost"
|
|
|
|
});
|
|
|
|
});
|
|
|
|
return posts;
|
2016-01-07 10:25:27 +00:00
|
|
|
},
|
|
|
|
projects: function(){
|
|
|
|
var projects = this.getCollection("html").findAllLive({relativeOutDirPath: "projects"});
|
2016-09-03 17:47:02 +01:00
|
|
|
projects.on("add", function(project){
|
|
|
|
project.setMetaDefaults({
|
2016-01-07 10:44:54 +00:00
|
|
|
layout: "contentpage"
|
2016-01-07 10:25:27 +00:00
|
|
|
});
|
|
|
|
});
|
2016-01-07 10:44:54 +00:00
|
|
|
return projects;
|
2016-01-07 10:25:27 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
plugins: {
|
|
|
|
cleanurls: {
|
|
|
|
static: true
|
2016-04-13 08:08:08 +01:00
|
|
|
},
|
|
|
|
moment: {
|
|
|
|
formats: [
|
|
|
|
{
|
|
|
|
raw: "date",
|
|
|
|
format: "MMMM Do, YYYY",
|
|
|
|
formatted: "formattedDate"
|
|
|
|
}
|
|
|
|
]
|
2016-10-21 16:56:21 +01:00
|
|
|
},
|
|
|
|
livereload: {
|
|
|
|
enabled: true
|
2016-04-13 08:08:08 +01:00
|
|
|
}
|
2016-04-13 12:04:05 +01:00
|
|
|
},
|
|
|
|
events: {
|
|
|
|
populateCollections: function(){
|
|
|
|
this.docpad.blocks["scripts"].add([
|
|
|
|
"/libs/jquery.min.js",
|
|
|
|
"/libs/jquery.smoothState.min.js",
|
|
|
|
"/script.js"
|
|
|
|
], {
|
|
|
|
defer: false
|
|
|
|
});
|
|
|
|
this.docpad.blocks["styles"].add([
|
|
|
|
"/libs/Animate.css",
|
|
|
|
"/libs/fa.css",
|
|
|
|
"/styles.css",
|
|
|
|
"https://fonts.googleapis.com/css?family=Open+Sans"
|
|
|
|
]);
|
|
|
|
}
|
2016-10-21 16:56:21 +01:00
|
|
|
},
|
|
|
|
environments: {
|
|
|
|
static: {
|
|
|
|
plugins: {
|
|
|
|
livereload: {
|
|
|
|
enabled: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-04-13 12:04:05 +01:00
|
|
|
}
|
2016-01-07 10:25:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = docpadConfig;
|