generated from frontendweekly/emptyEleven
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eleventy.js
31 lines (26 loc) · 894 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
const toml = require('toml');
// Plugins
const rssPlugin = require('@11ty/eleventy-plugin-rss');
const syntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight');
const eleventyNavigationPlugin = require('@11ty/eleventy-navigation');
const md = require('@frontendweekly/eleventy-plugin-markdown');
module.exports = function (eleventyConfig) {
// Add plugins
eleventyConfig.addPlugin(rssPlugin);
eleventyConfig.addPlugin(syntaxHighlight);
eleventyConfig.addPlugin(eleventyNavigationPlugin);
// I like toml...
eleventyConfig.addDataExtension('toml', contents => toml.parse(contents));
// markdown-it config
eleventyConfig.setLibrary('md', md);
return {
dir: {
input: '11ty',
output: 'dist',
},
templateFormats: ['njk', 'md', '11ty.js'],
htmlTemplateEngine: 'njk',
markdownTemplateEngine: 'njk',
passthroughFileCopy: true,
};
}