sp-codes.de/.eleventy.js

27 lines
870 B
JavaScript
Raw Normal View History

2020-06-01 19:44:08 +00:00
const eleventyNavigationPlugin = require("@11ty/eleventy-navigation");
module.exports = function(eleventyConfig) {
2020-07-27 15:41:08 +00:00
eleventyConfig.addWatchTarget("./src/scss/");
2020-06-01 19:44:08 +00:00
eleventyConfig.addPlugin(eleventyNavigationPlugin);
eleventyConfig.setUseGitIgnore(false);
eleventyConfig.addPassthroughCopy({
2020-07-27 15:41:08 +00:00
"src/img": "img",
"src/font": "font",
2020-06-01 19:44:08 +00:00
"node_modules/@fortawesome/fontawesome-free/webfonts/": "font",
"node_modules/flag-icon-css/flags/4x3/(de|us)*": "flags"
});
eleventyConfig.addShortcode("translatedUrl", function(currentLocale, newLocale) {
return this.page.url.replace(new RegExp(`\/${currentLocale}\/`), `/${newLocale}/`);
});
2020-06-01 19:44:08 +00:00
return {
dir: {
2020-07-27 15:41:08 +00:00
input: "src",
2020-06-01 19:44:08 +00:00
includes: "_includes",
layouts: "_includes/layouts",
output: "dist"
}
};
};