forked from mtsknn/mtsknn.fi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eleventy.js
37 lines (29 loc) · 1.1 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
require('dotenv').config()
const setupBrowserSync = require('./eleventy/browserSync')
const setupCollections = require('./eleventy/collections')
const setupPreact = require('./eleventy/preact')
module.exports = (config) => {
setupBrowserSync(config)
setupCollections(config)
setupPreact(config)
config.addPassthroughCopy({ './assets/favicon/': '/' })
config.addPassthroughCopy({ './assets/fonts/': '/fonts/' })
config.addPassthroughCopy('./content/**/*.{jpg,jpeg,png}')
// Defaults to true in Eleventy 1.0.
// https://www.11ty.dev/docs/data-deep-merge/
config.setDataDeepMerge(true)
// Disable automatic conversion of Markdown to HTML;
// we'll call `md.render(content)` manually in layouts.
// This way we can access pages' raw Markdown (via `content`)
// which wouldn't otherwise be possible (https://github.com/11ty/eleventy/issues/1206).
config.setLibrary('md', { render: (markdown) => markdown })
config.setQuietMode(true)
return {
dir: {
input: './content/',
// These are relative to the input dir
data: '../data/',
includes: '../layouts/',
},
}
}