Adding og-images (hopefully)
This commit is contained in:
1 parent
97ecb0411c
commit
1d9bc704e2
7 files changed
+1335
-3
No files matched your search
@@ -3,6 +3,7 @@ const markdownPlugin = require('./markdown');
|
||||
const rss = require('@11ty/eleventy-plugin-rss');
|
||||
const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
|
||||
const imagePlugin = require('./image');
|
||||
const ogImagePlugin = require('./og-image');
|
||||
|
||||
module.exports = function(eleventyConfig) {
|
||||
eleventyConfig.addPlugin(syntaxHighlight);
|
||||
@@ -10,4 +11,5 @@ module.exports = function(eleventyConfig) {
|
||||
eleventyConfig.addPlugin(markdownPlugin);
|
||||
eleventyConfig.addPlugin(imagePlugin);
|
||||
eleventyConfig.addPlugin(EleventyRenderPlugin);
|
||||
eleventyConfig.addPlugin(ogImagePlugin);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
const ogImagePlugin = require('eleventy-plugin-og-image');
|
||||
const fs = require('node:fs');
|
||||
|
||||
module.exports = function (eleventyConfig) {
|
||||
eleventyConfig.addPlugin(ogImagePlugin, {
|
||||
satoriOptions: {
|
||||
fonts: [
|
||||
{
|
||||
name: 'Space Grotesk',
|
||||
data: fs.readFileSync('./src/assets/fonts/SpaceGrotesk-Regular.ttf'),
|
||||
weight: 500,
|
||||
style: 'normal',
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user