-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eleventy.js
46 lines (39 loc) · 1.25 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
const MarkdownIt = require("markdown-it")
const md = new MarkdownIt()
module.exports = function(eleventyConfig) {
// sitemap
const sitemap = require("@quasibit/eleventy-plugin-sitemap")
eleventyConfig.addPlugin(sitemap, {
sitemap: {
hostname: "https://www.silex.me",
},
})
// slideshow
eleventyConfig.addPassthroughCopy({
'node_modules/@splidejs/splide/dist/js': 'js',
'node_modules/@splidejs/splide/dist/css': 'css',
})
// copy folders
eleventyConfig.addPassthroughCopy('assets')
eleventyConfig.addPassthroughCopy('uploads')
eleventyConfig.addPassthroughCopy('images')
eleventyConfig.addPassthroughCopy('css/*.css')
eleventyConfig.addPassthroughCopy('css/*.jpg') // favicon
eleventyConfig.addPassthroughCopy('css/*.png') // favicon
eleventyConfig.addPassthroughCopy('css/*.ico') // favicon
eleventyConfig.addPassthroughCopy('js')
eleventyConfig.addPassthroughCopy('CNAME')
eleventyConfig.addFilter('getCollectionItemByFileSlug', function(collection, name) {
return collection.find(item => item.fileSlug === name)
})
eleventyConfig.addFilter('markdown', function(m) {
return md.render(m)
})
// other config
return {
dir: {
layouts: '_layouts',
includes: '_includes',
},
}
}