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("subpages", (collectionApi) => { // const sections = collectionApi.getFilteredByTag( "subpage" ) const sections = collectionApi.getFilteredByGlob("./src/pages/subpages/**") .sort((a, b) => a.data.pageOrderId - b.data.pageOrderId); process.env.DEBUG && console.log(inspect(sections)); return sections; }); config.addCollection("projects", (collectionApi) => { // const sections = collectionApi.getFilteredByTag( "subpage" ) const sections = collectionApi.getFilteredByGlob("./src/projects/**") .sort((a, b) => a.data.pageOrderId - b.data.pageOrderId); process.env.DEBUG && console.log(inspect(sections)); return sections; }); // config.addCollection('projects', collection => { // return [...collection.getFilteredByGlob('./src/projects/*.md')].reverse(); // }); config.addCollection('experiences', collection => { return [...collection.getFilteredByGlob('./src/experiences/*.md')].reverse(); }); return { markdownTemplateEngine: 'liquid', dataTemplateEngine: 'liquid', htmlTemplateEngine: 'liquid', dir: { input: 'src', output: 'dist' } }; };