const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
module.exports = config => {
// Set directories to pass through to the dist folder
config.addPassthroughCopy('./src/images/');
config.addPassthroughCopy('./src/fonts/');
config.addPassthroughCopy('./src/js/');
config.addPassthroughCopy('./src/assets/icon-sprite.svg');
config.addPassthroughCopy('./src/assets/icons/payments/');
config.addPassthroughCopy('./src/prototypes/storefront/images/');
// config.addPassthroughCopy('./src/decks/*.pdf');
// Watch sass folder for changes
config.addWatchTarget("./src/scss/");
// Plugins
// config.addPlugin(rssPlugin);
config.addPlugin(syntaxHighlight);
// Shortcodes
config.addShortcode("icon", function(name, classes) {
return ``
});
config.addPairedShortcode("codeSample", function(content) {
return `
HTML
${content}
`
});
// Tell 11ty to use the .eleventyignore and ignore our .gitignore file
config.setUseGitIgnore(false);
// open a browser window on --watch
// config.setBrowserSyncConfig({
// open: true,
// });
config.addShortcode("year", () => `${new Date().getFullYear()}`);
return {
markdownTemplateEngine: 'njk',
dataTemplateEngine: 'njk',
htmlTemplateEngine: 'njk',
dir: {
input: 'src',
output: 'docs'
}
};
};