-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eleventy.js
34 lines (27 loc) · 900 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
module.exports = function(eleventyConfig) {
eleventyConfig.addPassthroughCopy("src/favicon.ico");
eleventyConfig.addPassthroughCopy("src/humans.txt");
eleventyConfig.addPassthroughCopy("src/css");
eleventyConfig.addPassthroughCopy("src/js");
eleventyConfig.addPassthroughCopy("src/media");
eleventyConfig.addFilter("to12hourTime", function(timeString) {
let date = new Date(timeString);
let time = date.toLocaleTimeString('en-US', {
timezone: 'America/New_York',
hour12: true,
hour: 'numeric',
minute: 'numeric',
})
return time;
});
let md = require('markdown-it')();
eleventyConfig.addFilter("markdown", function(string) {
return md.render(string);
});
return {
dir: {
input: "src",
},
passthroughFileCopy: true,
};
};