-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eleventy.js
95 lines (82 loc) · 2.66 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// inspired by https://github.com/webpixels/bootstrap-starter-kit
const markdownIt = require('markdown-it')
const { EleventyRenderPlugin } = require('@11ty/eleventy')
module.exports = function (config) {
config.addPassthroughCopy('src/assets')
config.addWatchTarget('./src/')
config.addWatchTarget('./src/scss')
config.addLayoutAlias('layout1', 'layout1.njk')
config.addPlugin(EleventyRenderPlugin)
config.addCollection('slots', collection => {
return collection
.getFilteredByGlob([
'./src/contents/talks/*.md',
'./src/contents/schedule_slots/*.md',
])
.sort((a, b) => a.data.timeslot.localeCompare(b.data.timeslot))
})
config.addCollection('talks', collection => {
return collection
.getFilteredByGlob('./src/contents/talks/*.md')
.sort((a, b) => {
return a.data.weight - b.data.weight
})
})
config.addCollection('sponsor_packages', collection => {
return collection
.getFilteredByGlob('./src/contents/sponsor_packages/*.md')
.sort((a, b) => {
return a.data.weight - b.data.weight
})
})
config.addCollection('sponsors_platinum', collection => {
return collection
.getFilteredByGlob('./src/contents/sponsors/*.md')
.filter(s => s.data.level == 'platinum')
.sort((a, b) => a.data.weight - b.data.weight)
})
config.addCollection('sponsors_gold',(collection) => {
return collection
.getFilteredByGlob('./src/contents/sponsors/*.md')
.filter(s => s.data.level == 'gold')
.sort((a, b) => a.data.weight - b.data.weight)
})
config.addCollection('sponsors_silver', collection => {
return collection
.getFilteredByGlob('./src/contents/sponsors/*.md')
.filter(s => s.data.level == 'silver')
.sort((a, b) => a.data.weight - b.data.weight)
})
config.addCollection('sponsors_bronze', collection => {
return collection
.getFilteredByGlob('./src/contents/sponsors/*.md')
.filter(s => s.data.level == 'bronze')
.sort((a, b) => a.data.weight - b.data.weight)
})
config.addCollection('media_partners', collection => {
return collection
.getFilteredByGlob('./src/contents/media_partners/*.md')
.sort((a, b) => a.data.weight - b.data.weight)
})
/*
let options = {
html: true,
breaks: true,
linkify: true
};
config.setLibrary("md", markdownIt(options));
*/
return {
dir: {
input: 'src',
output: 'dist',
includes: 'includes',
//data: "data", // relative to input
},
site: {},
templateFormats: ['html', 'njk', 'md', '11ty.js'],
htmlTemplateEngine: 'njk',
markdownTemplateEngine: 'njk',
//passthroughFileCopy: true
}
}