-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eleventy.js
29 lines (26 loc) · 984 Bytes
/
.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
const syntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight');
const { default: getShareImage } = require('@jlengstorf/get-share-image');
module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(syntaxHighlight);
eleventyConfig.addPassthroughCopy('assets');
eleventyConfig.addPassthroughCopy('_redirects');
eleventyConfig.addPassthroughCopy({
'node_modules/instant.page/instantpage.js': 'assets/instantpage.js'
});
eleventyConfig.addPassthroughCopy('blog/**/*.jpg');
eleventyConfig.addPassthroughCopy('blog/**/*.png');
eleventyConfig.setTemplateFormats(['md', 'njk']);
eleventyConfig.addNunjucksFilter('social', (title, desc) => {
return getShareImage({
title: title,
tagline: desc,
cloudName: 'mslooten',
imagePublicID: 'social-share-card',
titleFont: 'Open Sans',
taglineFont: 'Open Sans',
titleExtraConfig: '_bold',
taglineFontSize: 32,
textColor: '4a5568'
});
});
};