-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eleventy.js
40 lines (34 loc) · 1.35 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
module.exports = function (eleventyConfig) {
// Create cards collection
// Note: See the _cards/11tydata .js file in the _cards directory
// Current best practice appears to be setting 'permalink: false' there
// Yet, having settings for that collection in two places feels strange
eleventyConfig.addCollection('cards', function (collectionApi) {
return collectionApi.getFilteredByGlob('src/_cards/*.md');
});
eleventyConfig.addCollection('coverLetters', function (collectionApi) {
return collectionApi.getFilteredByGlob('./src/_cover-letters/*.md');
});
// Make Liquid capable of rendering "partials"
eleventyConfig.setLiquidOptions({
dynamicPartials: false,
});
// Explicity use .eleventyignore, not .gitignore
eleventyConfig.setUseGitIgnore(false);
// Passthrough static items
eleventyConfig.addPassthroughCopy({ './src/css/resume.css': './css/resume.css' });
eleventyConfig.addPassthroughCopy({ './src/static': '.' });
eleventyConfig.addPassthroughCopy('./src/images');
eleventyConfig.addPassthroughCopy('./src/js');
// Watch for css and config changes
eleventyConfig.addWatchTarget('./tailwind.config.js');
eleventyConfig.addWatchTarget('./src/css/main.css');
eleventyConfig.addWatchTarget('./src/css/resume.css');
return {
dir: {
input: 'src',
output: 'dist',
layouts: '_layouts'
}
}
};