-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eleventy.js
33 lines (28 loc) · 1.08 KB
/
.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
const { DateTime } = require('luxon');
const CtaBanner = require('./src/_includes/components/CtaBanner');
const AddToContactsBtn = require('./src/_includes/components/AddToContactsBtn');
module.exports = function (eleventyConfig) {
eleventyConfig.addPassthroughCopy('src/assets/');
eleventyConfig.addPassthroughCopy('src/css/');
eleventyConfig.addPassthroughCopy('src/fonts/');
eleventyConfig.addPassthroughCopy('src/scripts/');
eleventyConfig.addPassthroughCopy('src/admin/');
eleventyConfig.addPassthroughCopy('src/_redirects');
eleventyConfig.addWatchTarget('src/**/*.css');
eleventyConfig.addShortcode('CtaBanner', CtaBanner);
eleventyConfig.addShortcode('AddToContactsBtn', AddToContactsBtn);
eleventyConfig.addFilter('postDate', (dateObj) => {
return DateTime.fromJSDate(dateObj).toLocaleString(DateTime.DATE_MED);
});
return {
dir: {
input: 'src',
includes: '_includes',
output: '_site',
},
templateFormts: ['md', 'njk', 'html'],
markdownTemplateEngine: 'njk',
htmlTemplateEngine: 'njk',
dataTemplateEngine: 'njk',
};
};