2019-12-02 15:46:19 +00:00
|
|
|
module.exports = (config) => {
|
|
|
|
|
2019-12-02 17:11:32 +00:00
|
|
|
// add collection for pages
|
2019-12-02 15:46:19 +00:00
|
|
|
config.addCollection('pages', (collection) => {
|
|
|
|
return collection.getFilteredByGlob("**/*.md");
|
|
|
|
})
|
|
|
|
|
2019-12-06 15:21:29 +00:00
|
|
|
// custom filters
|
|
|
|
config.addFilter("makeLowercase", (value) => {
|
|
|
|
if (typeof value === 'string' || value instanceof String) {
|
2019-12-07 21:49:59 +00:00
|
|
|
return value.toLowerCase()
|
2019-12-06 15:21:29 +00:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2019-12-02 17:11:32 +00:00
|
|
|
// added passthrough for global assets
|
2019-12-02 15:46:19 +00:00
|
|
|
config.addPassthroughCopy("assets")
|
2019-12-02 17:11:32 +00:00
|
|
|
// added passthrough for images in their respective folders
|
2019-12-02 15:46:19 +00:00
|
|
|
config.addPassthroughCopy("_content/**/images/**")
|
|
|
|
|
2019-12-02 17:11:32 +00:00
|
|
|
// reutrn updated config
|
2019-12-02 15:46:19 +00:00
|
|
|
return {
|
|
|
|
dir: {
|
2019-12-02 17:11:32 +00:00
|
|
|
input: "_content", // content
|
|
|
|
includes: "../_includes", // templates
|
|
|
|
output: "_site", // rendered site
|
|
|
|
data: "../_data" // global data files
|
2019-12-02 15:46:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|