This repository has been archived on 2024-01-16. You can view files and clone it, but cannot push or open issues or pull requests.
alfadatizar/eleventy.config.js

31 lines
892 B
JavaScript
Raw Permalink Normal View History

2023-07-03 02:11:51 +00:00
/**
* @param {import("@11ty/eleventy").UserConfig} eleventyConfig
*/
2023-06-29 02:03:19 +00:00
module.exports = function (eleventyConfig) {
eleventyConfig.setServerOptions({
2023-07-03 02:11:51 +00:00
watch: ["src/**/*.css"],
2023-06-29 02:03:19 +00:00
});
2023-07-29 03:01:48 +00:00
eleventyConfig.addWatchTarget("src/");
eleventyConfig.addWatchTarget("tailwind.config.js");
2023-06-29 02:03:19 +00:00
2023-07-03 02:11:51 +00:00
eleventyConfig.addShortcode("tailwind", async () => {
const from = "src/tailwind.css";
return await postcss.process(await readFile(from, "utf-8"), { from });
});
2023-08-05 20:08:01 +00:00
eleventyConfig.addPassthroughCopy("src/**/*.png");
2023-07-29 03:01:48 +00:00
eleventyConfig.addPassthroughCopy("src/**/*.webp");
eleventyConfig.addPassthroughCopy("src/**/*.woff");
eleventyConfig.addPassthroughCopy("src/**/*.woff2");
2023-08-05 20:31:45 +00:00
eleventyConfig.addPassthroughCopy("src/assets/img/**/*.svg");
2023-07-02 20:50:53 +00:00
2023-07-03 15:07:56 +00:00
eleventyConfig.addExtension(["11ty.jsx", "11ty.ts", "11ty.tsx"], {
key: "11ty.js",
});
2023-06-29 02:03:19 +00:00
return {
dir: {
input: "src",
},
};
};