-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eleventy.js
46 lines (37 loc) · 1.03 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
const markdownIt = require("markdown-it");
module.exports = function (eleventyConfig) {
// Markdown onfigurarion
const md = new markdownIt({
html: true
});
// Copy `src/fonts/` to `_site/fonts`, `src/images/` to `_site/images`
eleventyConfig.addPassthroughCopy({
"src/fonts": "fonts",
"src/images": "images",
"src/scss/custom": "css/custom"
});
// site crawler
eleventyConfig.addPassthroughCopy('robots.txt');
// site icon
eleventyConfig.addPassthroughCopy('favicon.ico');
// sitemap
eleventyConfig.addPassthroughCopy('sitemap.xml');
// web.config
eleventyConfig.addPassthroughCopy('web.config');
// Markdown rendering onfigurarion
eleventyConfig.addPairedShortcode("markdown", (content) => {
return md.render(content);
});
return {
dir: {
// site content pages
input: "pages",
data: "../src/_data",
// site structure pages (path is realtive to input directory)
includes: "../src/_includes",
layouts: "../src/_includes/layouts",
// site final outpuut directory
output: "_site",
},
};
};