forked from eslint/archive-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eleventy.js
28 lines (22 loc) · 846 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
"use strict";
const { addPlugins, addFilters, addTransforms } = require("./_11ty");
const yaml = require("js-yaml");
module.exports = function(eleventyConfig) {
addPlugins(eleventyConfig);
addFilters(eleventyConfig);
addTransforms(eleventyConfig);
// Add YAML files as data sources
eleventyConfig.addDataExtension("yml", contents => yaml.safeLoad(contents));
// Add collection of blog posts.
eleventyConfig.addCollection("posts", collection => collection.getFilteredByGlob("_posts/*.md").reverse());
// Copy over static assets.
eleventyConfig.addPassthroughCopy("assets");
eleventyConfig.addPassthroughCopy({ "public/*": "." });
eleventyConfig.addPassthroughCopy("docs/**/*.svg");
return {
dir: {
includes: "_includes",
layouts: "_layouts"
}
};
};