homepage/eleventy.config.cjs
2024-11-03 17:16:20 +01:00

23 lines
840 B
JavaScript

module.exports = async function(eleventyConfig) {
// Input directory: src
// Output directory: _site
eleventyConfig.addWatchTarget("tailwind.config.js");
eleventyConfig.addWatchTarget(".src/**/*/*.css");
eleventyConfig.addFilter("truncatewords", function (str = "", limit = 30) {
return str.toString()
.trim()
.split(/\s+/g, limit)
.join(" ") + "…";
});
eleventyConfig.addPassthroughCopy("src/**/*/tailwind.css");
eleventyConfig.addPassthroughCopy("src/assets/img");
eleventyConfig.addPassthroughCopy("src/scripts/");
eleventyConfig.addPassthroughCopy("src/**/*.{png, jpeg, jpg, avif, gif}");
eleventyConfig.addPassthroughCopy("src/**/*.{ttf,otf,woff}");
};
module.exports.config = {
markdownTemplateEngine: "njk",
htmlTemplateEngine: 'njk',
};