-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eleventy.js
43 lines (37 loc) · 1.29 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
// @ts-check
process.on('unhandledRejection', (err) => {
console.log(err)
})
/**
* @type {(eleventyConfig: import("@11ty/eleventy/src/UserConfig")) => Partial<ReturnType<import("@11ty/eleventy/src/defaultConfig")>>}
*/
module.exports = (eleventyConfig) => {
eleventyConfig.addGlobalData('layout', 'default.jsx')
eleventyConfig.addPlugin(require('eleventy-hast-jsx').plugin)
eleventyConfig.addPassthroughCopy('assets/css')
eleventyConfig.addPassthroughCopy('assets/images')
eleventyConfig.addPassthroughCopy('assets/js')
eleventyConfig.addPassthroughCopy({
'node_modules/algoliasearch/dist/algoliasearch-lite.umd.js':
'assets/vendor/algoliasearch.js',
'node_modules/instantsearch.js/dist/instantsearch.production.min.js':
'assets/vendor/instantsearch.js',
'assets/root': '/',
'node_modules/@fontsource/merriweather/': 'assets/fonts/merriweather',
'node_modules/firacode/distr': 'assets/fonts/fira-code',
})
eleventyConfig.addWatchTarget('assets')
eleventyConfig.addWatchTarget('components')
eleventyConfig.setQuietMode(true)
return {
markdownTemplateEngine: 'md',
htmlTemplateEngine: 'html',
dir: {
input: 'pages',
includes: '../includes',
layouts: '../layouts',
data: '../data',
output: 'public',
},
}
}