const eleventyNavigationPlugin = require("@11ty/eleventy-navigation"); const markdownIt = require("markdown-it"); const { DateTime } = require("luxon"); const MARKDOWN_OPTIONS = { html: true, breaks: true, linkify: true, typographer: true, }; const md = new markdownIt(MARKDOWN_OPTIONS); module.exports = function (eleventyConfig) { // Libraries eleventyConfig.setLibrary("md", md); // Plugins eleventyConfig.addPlugin(eleventyNavigationPlugin); // Filters eleventyConfig.addFilter("formatDate", (dateObj) => { return DateTime.fromJSDate(dateObj).toFormat("y'-'LL'-'dd' 'HH':'mm"); }); // Passthrough copies eleventyConfig.addPassthroughCopy({ "./src/res/css/**/*.css": "css" }); eleventyConfig.addPassthroughCopy({ "./src/res/font": "font" }); eleventyConfig.addPassthroughCopy({ "./src/res/img": "img" }); eleventyConfig.addPassthroughCopy({ "./src/res/*.txt": "." }); eleventyConfig.addWatchTarget("./src/res/css"); // Watch stylesheets return { dir: { input: "src", output: "_site", }, }; };