-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eleventy.js
52 lines (45 loc) · 1.34 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
/***************
* NAGINATA.fi *
***************
* Juga Paazmaya <paazmaya@yahoo.com>
* License: Attribution-ShareAlike 4.0 Unported
* http://creativecommons.org/licenses/by-sa/4.0/
*/
import facebook from './lib/facebook-meta.js';
import flickrImageList from './lib/flickr-image-list.js';
/** @param {import("@11ty/eleventy").UserConfig} eleventyConfig */
export default function(eleventyConfig) {
eleventyConfig.addPassthroughCopy({
'src/img': 'img'
});
eleventyConfig.addPassthroughCopy({
'src/icons': 'icons'
});
eleventyConfig.addPassthroughCopy({
assets: '/'
});
eleventyConfig.addGlobalData('facebook', facebook());
eleventyConfig.addGlobalData('prefetch', flickrImageList());
// Create language specific collections, to reduce complexity in templates
eleventyConfig.addCollection('en', function(api) {
return api.getFilteredByGlob('*/en/*.md');
});
eleventyConfig.addCollection('fi', function(api) {
return api.getFilteredByGlob('*/fi/*.md');
});
eleventyConfig.addCollection('ja', function(api) {
return api.getFilteredByGlob('*/ja/*.md');
});
return {
dir: {
input: 'content',
includes: '../views', // relative to dir.input
output: 'dist'
},
data: {
layout: 'index.html'
},
markdownTemplateEngine: 'njk',
htmlTemplateEngine: 'njk'
};
}