site/.eleventy.js
2021-03-19 12:29:11 +01:00

20 lines
455 B
JavaScript

const { DateTime } = require("luxon");
module.exports = function (eleventyConfig) {
eleventyConfig.addPassthroughCopy("./src/css/styles.css");
eleventyConfig.addPassthroughCopy("./src/img");
eleventyConfig.addFilter("readableDate", (dateObj) => {
return DateTime.fromJSDate(dateObj, { zone: "utc" })
.setLocale("fr")
.toFormat("dd LLL yyyy");
});
return {
dir: {
input: "src",
output: "public",
},
};
};