generated from SootyOwl/site-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheleventy.config.js
24 lines (22 loc) · 920 Bytes
/
eleventy.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const markdownItTaskCheckbox = require('markdown-it-task-checkbox');
module.exports = (eleventyConfig) => {
// Add the interlinker plugin for obsidian wikilink support
eleventyConfig.addPlugin(
require('@photogabble/eleventy-plugin-interlinker'), {}
);
// Add an alias for the post layout
eleventyConfig.addLayoutAlias("post", "mylayout.njk");
// Set the input directory and copy the bundle.css file to the output directory
eleventyConfig.setInputDirectory("content");
eleventyConfig.addPassthroughCopy("content/bundle.css");
// Add the markdown-it-task-checkbox plugin to the markdown-it parser
eleventyConfig.amendLibrary("md", (mdLib) => mdLib.use(markdownItTaskCheckbox));
// Add the date filter
eleventyConfig.addFilter("dateFormat", (date) => {
return new Date(date).toLocaleDateString("en-GB", {
year: "numeric",
month: "long",
day: "numeric",
});
});
};