-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eleventy.js
41 lines (35 loc) · 1014 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
40
41
const markdownIt = require("markdown-it");
module.exports = function (eleventyConfig) {
// A useful way to reference the context we are runing eleventy in
let env = process.env.ELEVENTY_ENV;
eleventyConfig.addWatchTarget("includes/css/");
eleventyConfig.addWatchTarget("includes/js/");
eleventyConfig.addWatchTarget("includes/scss/");
//Markdown config
const md = new markdownIt({
html: true,
});
eleventyConfig.addPairedShortcode("markdown", (content) => {
return md.render(content);
});
eleventyConfig.addPassthroughCopy({
"src/site/_includes/css/*": "css/",
"src/site/_includes/js/*": "js/",
"node_modules/gsap/dist/": "js/gsap/",
});
// make the seed target act like prod
env = env == "seed" ? "prod" : env;
return {
passthroughFileCopy: true,
dir: {
includes: "_includes",
layouts: "_layouts",
input: "src/site",
output: "dist",
data: `_data/${env}`,
},
templateFormats: ["njk", "md"],
htmlTemplateEngine: "njk",
markdownTemplateEngine: "njk",
};
};