37 lines
1.1 KiB
JavaScript
37 lines
1.1 KiB
JavaScript
const inspect = require("util").inspect;
|
|
|
|
module.exports = config => {
|
|
config.setUseGitIgnore(false);
|
|
|
|
config.addPassthroughCopy({"./src/_includes/js/" : "/js"});
|
|
|
|
config.addLayoutAlias('base', 'layouts/base.html');
|
|
|
|
config.addCollection("sections", (collectionApi) => {
|
|
const sections = collectionApi.getFilteredByGlob("./src/pages/sections/**")
|
|
.sort((a, b) => a.data.order - b.data.order);
|
|
process.env.DEBUG && console.log(inspect(sections));
|
|
return sections;
|
|
});
|
|
config.addCollection("projects", (collectionApi) => {
|
|
const projects = collectionApi.getFilteredByGlob("./src/projects/**")
|
|
.sort((a, b) => a.data.order - b.data.order);
|
|
process.env.DEBUG && console.log(inspect(projects));
|
|
return projects;
|
|
});
|
|
|
|
config.addCollection('experiences', collection => {
|
|
return [...collection.getFilteredByGlob('./src/experiences/*.md')]
|
|
.sort((a, b) => a.data.startDate - b.data.startDate).reverse();
|
|
});
|
|
|
|
return {
|
|
markdownTemplateEngine: 'liquid',
|
|
dataTemplateEngine: 'liquid',
|
|
htmlTemplateEngine: 'liquid',
|
|
dir: {
|
|
input: 'src',
|
|
output: 'dist'
|
|
}
|
|
};
|
|
}; |