-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eleventy.js
33 lines (24 loc) · 855 Bytes
/
.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
const markdownIt = require("markdown-it");
// Add within your config module
const md = new markdownIt({
html: true,
});
const createCollectionsAndFilters = require('./_utils/index.js');
module.exports = function(eleventyConfig) {
eleventyConfig.addFilter("markdown", (content) => {
if (typeof content == "string") {
return md.render(content);
}
return content;
});
eleventyConfig.addPassthroughCopy({"theme/assets": "assets"});
eleventyConfig.addPassthroughCopy("admin");
createCollectionsAndFilters(eleventyConfig);
return {
dir: {
input: "cms",
includes: "../theme",
output: "public"
}
};
};