-
Notifications
You must be signed in to change notification settings - Fork 19
/
.eleventy.js
39 lines (31 loc) · 955 Bytes
/
.eleventy.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// const sass = require("sass");
const eleventySass = require("eleventy-sass");
// Add above your Eleventy config
const markdownIt = require("markdown-it");
// Add within your config module
const md = new markdownIt({
html: true,
});
module.exports = function(eleventyConfig) {
// Copy `img/` to `_site/img`
eleventyConfig.addPassthroughCopy({"src/img": "img"});
eleventyConfig.addPassthroughCopy({"src/manifest.json": "manifest.json"});
eleventyConfig.addPlugin(eleventySass);
eleventyConfig.addFilter("markdown", (content) => {
return md.render(content);
});
eleventyConfig.addFilter("talkdateformat", function(date){
return new Date(date).toLocaleString('en-GB', {
weekday: 'long',
year: 'numeric',
month: 'long',
day: 'numeric'
});
})
return {
dir: {
input: "src",
output: "docs"
}
}
};