gil.ink/.eleventy.js

41 lines
890 B
JavaScript
Raw Normal View History

2025-02-06 21:51:23 -05:00
import eleventyNavigationPlugin from "@11ty/eleventy-navigation";
import markdownIt from "markdown-it";
import markdownItFootnote from "markdown-it-footnote";
import markdownItAnchor from "markdown-it-anchor";
2025-02-18 15:12:10 -05:00
export default function (eleventyConfig) {
2025-02-06 21:51:23 -05:00
2025-02-18 15:12:10 -05:00
const MARKDOWN_OPTIONS = {
html: true,
breaks: true,
linkify: true,
typographer: true,
};
let md = markdownIt(MARKDOWN_OPTIONS)
.use(markdownItFootnote)
.use(markdownItAnchor);
2025-02-06 21:51:23 -05:00
// Libraries
eleventyConfig.setLibrary("md", md);
// Plugins
eleventyConfig.addPlugin(eleventyNavigationPlugin);
// Passthrough copies
2025-02-18 15:12:10 -05:00
["src/assets"].forEach((path) => {
eleventyConfig.addPassthroughCopy(path);
});
2025-02-06 21:51:23 -05:00
eleventyConfig.addWatchTarget("./src/assets/css");
return {
dir: {
2025-02-18 15:12:10 -05:00
input: 'src',
output: 'public',
includes: '_includes',
layouts: '_layouts',
2025-02-06 21:51:23 -05:00
},
};
}