-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patheleventy.config.js
59 lines (48 loc) · 1.97 KB
/
eleventy.config.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
const { EleventyI18nPlugin, EleventyHtmlBasePlugin } = require("@11ty/eleventy");
const pluginRss = require("@11ty/eleventy-plugin-rss");
const pluginFilters = require("./eleventy.config.filters.js");
const pluginImages = require("./eleventy.config.images.js");
const pluginMarkdown = require("./eleventy.config.markdown.js");
module.exports = function (eleventyConfig) {
// Copy the contents of the `public` folder to the output folder
eleventyConfig.addPassthroughCopy({
"./src/assets/img/svg": "/assets/img",
"./src/assets/styles": "/assets/styles",
"./src/assets/js": "/assets/js",
"./src/assets/favicons": "/",
"./src/assets/manifest": "/",
"./src/assets/robots.txt": "/robots.txt",
});
// Run Eleventy when these files change:
// https://www.11ty.dev/docs/watch-serve/#add-your-own-watch-targets
eleventyConfig.addWatchTarget("src/assets");
// Official plugins
eleventyConfig.addPlugin(EleventyI18nPlugin, {
defaultLanguage: "en",
});
eleventyConfig.addPlugin(pluginRss);
eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
// Add plugins
eleventyConfig.addPlugin(pluginFilters);
eleventyConfig.addPlugin(pluginImages);
eleventyConfig.addPlugin(pluginMarkdown);
// Features to make your build faster (when you need them)
// If your passthrough copy gets heavy and cumbersome, add this line
// to emulate the file copy on the dev server. Learn more:
// https://www.11ty.dev/docs/copy/#emulate-passthrough-copy-during-serve
// eleventyConfig.setServerPassthroughCopyBehavior("passthrough");
return {
// Control which files Eleventy will process
templateFormats: ["md", "njk", "html", "liquid"],
// Pre-process *.md files with: (default: `liquid`)
markdownTemplateEngine: "njk",
// Pre-process *.html files with: (default: `liquid`)
htmlTemplateEngine: "njk",
dir: {
input: "src/content", // default: "."
includes: "../_templates", // default: "_includes"
data: "../_data", // default: "_data"
output: "_site", // default: "_site
},
};
};