forked from mochajs/mocha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eleventy.js
58 lines (48 loc) · 1.48 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
47
48
49
50
51
52
53
54
55
56
57
58
'use strict';
module.exports = function(eleventyConfig) {
eleventyConfig.addPlugin(
require('@11ty/eleventy-plugin-inclusive-language'),
{
words:
'simply,obviously,basically,of course,clearly,everyone knows,however,easy'
}
);
eleventyConfig.addPassthroughCopy('docs/css');
eleventyConfig.addPassthroughCopy('docs/js');
eleventyConfig.addPassthroughCopy('docs/images');
eleventyConfig.addPassthroughCopy('docs/CNAME');
eleventyConfig.addPassthroughCopy('docs/_headers');
eleventyConfig.addPassthroughCopy('docs/favicon.ico');
eleventyConfig.addPassthroughCopy('docs/example');
eleventyConfig.addPassthroughCopy('docs/api/images');
eleventyConfig.addPassthroughCopy('docs/api/scripts');
eleventyConfig.addPassthroughCopy('docs/api/styles');
/* Markdown Plugins */
const markdown = require('markdown-it')({
html: true,
linkify: true,
typographer: true
});
markdown.use(require('markdown-it-anchor'), {
slugify: require('uslug'),
permalink: true,
permalinkBefore: true,
permalinkClass: 'direct-link',
permalinkSymbol: '#'
});
markdown.use(require('markdown-it-attrs'), {
leftDelimiter: '{:',
rightDelimiter: '}'
});
markdown.use(require('markdown-it-prism'));
markdown.use(require('markdown-it-emoji'));
eleventyConfig.setLibrary('md', markdown);
eleventyConfig.setUseGitIgnore(false);
return {
passthroughFileCopy: true,
dir: {
input: 'docs',
output: 'docs/_site'
}
};
};