-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheleventy.config.js
37 lines (31 loc) · 1.18 KB
/
eleventy.config.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
import { fortawesomeBrandsPlugin } from '@vidhill/fortawesome-brands-11ty-shortcode';
import minify from "./src/transforms/minify.js";
import imageShortcode from "./src/shortcodes/imageShortcode.js";
export default function(eleventyConfig) {
eleventyConfig.addWatchTarget("./src/static/scss/");
eleventyConfig.addTransform("minify", minify);
// Shortcodes
eleventyConfig.addNunjucksAsyncShortcode('image', imageShortcode);
// Plugins
eleventyConfig.addPlugin(fortawesomeBrandsPlugin);
// Set directories to pass through to the dist folder
eleventyConfig.addPassthroughCopy('./src/static/images/');
eleventyConfig.addPassthroughCopy('./days-calculator')
eleventyConfig.addPassthroughCopy('./portfolio-project')
eleventyConfig.addPassthroughCopy('./speed-game')
// Returns case studies portfolio items, sorted by display order
eleventyConfig.addCollection('caseStudies', collection => {
return collection.getFilteredByGlob('./src/portfolio/*.md').filter(
x => x.data.caseStudy
);
});
};
export const config = {
markdownTemplateEngine: 'njk',
dataTemplateEngine: 'njk',
htmlTemplateEngine: 'njk',
dir: {
input: 'src',
output: 'public',
},
}