-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eleventy.js
63 lines (53 loc) · 1.44 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/**
* @file Eleventy’s configuration file
* @author Reuben L. Lillie <rlilie@pghnaz.org>
*/
// Require local modules
var fileToString = require('./src/includes/filters/file-to-string')
var minifyCSS = require('./src/includes/filters/minify-css')
/**
* Expose the configuration to 11ty as a function
* @module .eleventy
* @param 11ty’s config argument
* @see {@link https://www.11ty.io/docs/config/ 11ty docs}
*/
module.exports = function (eleventyConfig) {
// Pass 11ty config argument to local modules
fileToString(eleventyConfig)
minifyCSS(eleventyConfig)
/**
* Copy static assets directly from includes to output
* @see {@link https://www.11ty.io/docs/copy/ 11ty docs}
*/
eleventyConfig.addPassthroughCopy('src/includes/assets')
/**
* Overwrite 11ty’s default configuration options
* @see {@link https://www.11ty.io/docs/config/ 11ty docs}
*/
return {
dir: {
data: 'data', // relative to input
includes: 'includes', // relative to input
input: 'src',
output: 'dist'
}
}
}
/**
* Copy static assets directly from input to output
* @see {@link https://www.11ty.io/docs/copy/ 11ty docs}
*/
eleventyConfig.addPassthroughCopy('assets')
/**
* Overwrite 11ty’s default configuration options
* @see {@link https://www.11ty.io/docs/config/ 11ty docs}
*/
return {
dir: {
data: 'data', // relative to input
includes: 'includes', // relative to input
input: 'src',
output: 'dist'
}
}
}