site/.eleventy.js

27 lines
753 B
JavaScript
Raw Normal View History

2023-10-19 22:31:19 -04:00
const eleventyNavigationPlugin = require("@11ty/eleventy-navigation");
2023-10-19 01:33:51 -04:00
const { DateTime } = require("luxon");
2023-10-18 13:32:43 -04:00
module.exports = function (eleventyConfig) {
2023-10-19 22:31:19 -04:00
eleventyConfig.addPlugin(eleventyNavigationPlugin);
eleventyConfig.addFilter("formatDate", (dateObj) => {
return DateTime.fromJSDate(dateObj).toFormat("y'-'LL'-'dd");
2023-10-19 01:33:51 -04:00
});
2023-10-24 01:40:23 -04:00
eleventyConfig.addPassthroughCopy("./src/css/**/*.css");
eleventyConfig.addPassthroughCopy("./src/font");
2023-10-19 01:33:51 -04:00
eleventyConfig.addPassthroughCopy("./src/img");
eleventyConfig.addWatchTarget("./src/css");
2023-10-18 13:32:43 -04:00
2024-05-26 12:01:17 -04:00
eleventyConfig.addShortcode("sigil", function (name, label) {
2024-05-26 13:21:26 -04:00
return `<h3 class="sigil--${name}">${label}</h3>`;
2024-05-26 12:01:17 -04:00
});
2023-10-18 13:32:43 -04:00
return {
dir: {
input: "src",
output: "public",
},
};
};