25 lines
560 B
JavaScript
25 lines
560 B
JavaScript
import pug from "pug";
|
|
|
|
export default function (eleventyConfig) {
|
|
eleventyConfig.addPassthroughCopy("src/assets/img");
|
|
|
|
eleventyConfig.addExtension("pug", {
|
|
compile: (inputContent, inputPath) => {
|
|
const fn = pug.compile(inputContent, { filename: inputPath });
|
|
return (data) => fn(data);
|
|
},
|
|
});
|
|
|
|
return {
|
|
dir: {
|
|
input: "src",
|
|
output: "dist",
|
|
includes: "_includes",
|
|
data: "_data",
|
|
},
|
|
templateFormats: ["pug", "md", "html"],
|
|
htmlTemplateEngine: "pug",
|
|
markdownTemplateEngine: "pug",
|
|
};
|
|
}
|