-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eleventy.js
54 lines (44 loc) · 1.51 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
require('dotenv').config()
const filters = require('./utils/filters')
const transforms = require('./utils/transforms')
const shortcodes = require('./utils/shortcodes')
module.exports = function (config) {
// Add Filters
Object.keys(filters).forEach((filterName) => {
config.addFilter(filterName, filters[filterName])
})
// Transforms
Object.keys(transforms).forEach((transformName) => {
config.addTransform(transformName, transforms[transformName])
})
// Shortcodes
Object.keys(shortcodes).forEach((shortcodeName) => {
config.addShortcode(shortcodeName, shortcodes[shortcodeName])
})
// Asset Watch Targets
config.addWatchTarget('./src/assets')
//Tailwind
config.addWatchTarget('./styles/tailwind.config.js')
config.addWatchTarget('./styles/tailwind.css')
config.addPassthroughCopy({ './_tmp/style.css': './assets/css/style.css' })
// Pass-through files
config.addPassthroughCopy('src/robots.txt')
config.addPassthroughCopy('src/site.webmanifest')
config.addPassthroughCopy('src/assets/images')
config.addPassthroughCopy('src/assets/fonts')
// Deep-Merge
config.setDataDeepMerge(true)
// Base Config
return {
dir: {
input: 'src',
output: 'dist',
includes: '_includes',
layouts: '_layouts',
data: '_data'
},
templateFormats: ['njk', 'md', '11ty.js'],
htmlTemplateEngine: 'njk',
markdownTemplateEngine: 'njk'
}
}