-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eleventy.js
36 lines (30 loc) · 1.04 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
const yaml = require('js-yaml');
const pluginBundle = require("@11ty/eleventy-plugin-bundle");
const pluginRss = require("@11ty/eleventy-plugin-rss");
const pluginSyntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
const { EleventyHtmlBasePlugin } = require("@11ty/eleventy");
const pluginDrafts = require("./config/plugins/drafts.js");
const pluginImages = require("./config/plugins/images.js");
const pluginMarkdown = require("./config/plugins/markdown.js");
module.exports = (config) => {
config.setServerOptions({ port: 81 });
config.addPassthroughCopy({
'src/_includes/assets': './assets',
})
config.addDataExtension('yml', (contents) => yaml.load(contents));
config.addPlugin(pluginRss);
config.addPlugin(pluginSyntaxHighlight, {
preAttributes: { tabindex: 0 }
});
config.addPlugin(EleventyHtmlBasePlugin);
config.addPlugin(pluginBundle);
config.addPlugin(pluginDrafts);
config.addPlugin(pluginImages);
config.addPlugin(pluginMarkdown);
return {
dir: {
input: 'src',
output: 'public',
}
}
}