sp-codes.de/.eleventy.js
Samuel Philipp 4448b13580
All checks were successful
continuous-integration/drone/push Build is passing
minor bug fix in translation urls
added more heading icons
2021-04-05 21:46:34 +02:00

27 lines
870 B
JavaScript

const eleventyNavigationPlugin = require("@11ty/eleventy-navigation");
module.exports = function(eleventyConfig) {
eleventyConfig.addWatchTarget("./src/scss/");
eleventyConfig.addPlugin(eleventyNavigationPlugin);
eleventyConfig.setUseGitIgnore(false);
eleventyConfig.addPassthroughCopy({
"src/img": "img",
"src/font": "font",
"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}/`);
});
return {
dir: {
input: "src",
includes: "_includes",
layouts: "_includes/layouts",
output: "dist"
}
};
};