-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path.eleventy.js
More file actions
25 lines (20 loc) · 817 Bytes
/
.eleventy.js
File metadata and controls
25 lines (20 loc) · 817 Bytes
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
const env = require('./src/_data/env');
module.exports = function (eleventyConfig) {
// set browser sync config to support .html clean url routing
eleventyConfig.setBrowserSyncConfig(
require('./configs/browsersync.config')(env.folder.output)
);
// set copy asset folder to dist
eleventyConfig.addPassthroughCopy(env.folder.assets);
eleventyConfig.addPassthroughCopy(`${env.folder.input}/favicon.ico`);
// add plugins
eleventyConfig.addPlugin(require('@11ty/eleventy-plugin-rss'));
eleventyConfig.addPlugin(require('@11ty/eleventy-plugin-syntaxhighlight'));
eleventyConfig.addPlugin(require('./plugins'));
// set input and output folder
return {
dir: { input: env.folder.input, output: env.folder.output },
dataTemplateEngine: 'njk',
markdownTemplateEngine: 'njk'
};
}