-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eleventy.js
45 lines (36 loc) · 1.02 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
34
35
36
37
38
39
40
41
42
43
44
45
// docs: https://www.11ty.io/docs/config/
const cacheBuster = require('@mightyplow/eleventy-plugin-cache-buster');
module.exports = function(eleventyConfig) {
eleventyConfig.setUseGitIgnore(false);
eleventyConfig.addPlugin(cacheBuster({
outputDirectory: 'dist',
}));
eleventyConfig.setBrowserSyncConfig({
// scripts in body conflict with Turbolinks
snippetOptions: {
rule: {
match: /<\/head>/i,
fn: function(snippet, match) {
return snippet + match;
}
}
}
});
eleventyConfig.addWatchTarget("src/assets");
eleventyConfig.addPassthroughCopy("src/assets");
eleventyConfig.addWatchTarget("tmp/main.css");
eleventyConfig.addWatchTarget("tmp/main.js");
eleventyConfig.addPassthroughCopy({ "tmp": "." });
eleventyConfig.addShortcode("version", function () {
return String(Date.now());
});
return {
dir: {
input: "src",
includes: "includes",
layouts: "layouts",
output: "dist"
},
markdownTemplateEngine: 'ejs',
};
};