-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eleventy.js
executable file
·39 lines (33 loc) · 1.33 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
const markdownIt = require('markdown-it')
const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight")
const inclusiveLangPlugin = require("@11ty/eleventy-plugin-inclusive-language")
module.exports = function(eleventyConfig) {
eleventyConfig.addFilter("dateDisplay", require("./filters/dateDisplay.js"))
eleventyConfig.addFilter("valueIfEmpty", require("./filters/valueIfEmpty.js"))
eleventyConfig.addPassthroughCopy("src/CNAME")
eleventyConfig.addPassthroughCopy("src/robots.txt")
eleventyConfig.addPassthroughCopy("src/images")
eleventyConfig.addPassthroughCopy("src/css")
eleventyConfig.addPassthroughCopy("src/scripts")
eleventyConfig.addPlugin(inclusiveLangPlugin)
eleventyConfig.addPlugin(syntaxHighlight, {
templateFormats: ["md","html"],
words: "simply,obviously,basically,of course,clearly,just,everyone knows,however,easy"
})
const markdownEngine = markdownIt({ html: true })
eleventyConfig.setLibrary('md', markdownEngine)
// Unsorted items (in whatever order they were added)
eleventyConfig.addCollection("allContent", function(collectionApi) {
return collectionApi.getAll()
})
return {
dir: {
input: "src/",
output: "dist",
includes: "_includes"
},
// htmlTemplateEngine: "nunjucks",
// markdownTemplateEngine: "njk",
passthroughFileCopy: true
}
}