-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eleventy.js
47 lines (37 loc) · 1.14 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
require('dotenv/config')
const { eleventyAlembic } = require('@openlab/alembic/11ty')
const pluginRss = require('@11ty/eleventy-plugin-rss')
const syntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight')
const markdown = require('markdown-it')
const markdownAnchor = require('markdown-it-anchor')
const shortcodes = require('./11ty/shortcodes')
const filters = require('./11ty/filters')
const md = markdown({
html: true,
breaks: false,
linkify: false,
})
md.use(markdownAnchor)
/** @param {import("@11ty/eleventy/src/UserConfig")} eleventyConfig */
module.exports = function (eleventyConfig) {
eleventyConfig.addWatchTarget('./src/')
eleventyConfig.setLibrary('md', md)
eleventyConfig.addPassthroughCopy({
'src/font': 'font',
'src/img': 'img',
'src/video': 'video',
})
eleventyConfig.addPlugin(filters)
eleventyConfig.addPlugin(shortcodes)
eleventyConfig.addPlugin(eleventyAlembic)
eleventyConfig.addPlugin(pluginRss)
eleventyConfig.addPlugin(syntaxHighlight)
return {
dir: {
input: 'content',
includes: '_includes',
layouts: '_layouts',
},
markdownTemplateEngine: 'njk',
}
}