18 lines
451 B
JavaScript
18 lines
451 B
JavaScript
import fs from 'node:fs';
|
|
import ogImagePlugin from 'eleventy-plugin-og-image';
|
|
|
|
export default function (eleventyConfig) {
|
|
eleventyConfig.addPlugin(ogImagePlugin, {
|
|
satoriOptions: {
|
|
fonts: [
|
|
{
|
|
name: 'Space Grotesk',
|
|
data: fs.readFileSync('./src/assets/fonts/SpaceGrotesk-Regular.ttf'),
|
|
weight: 500,
|
|
style: 'normal',
|
|
},
|
|
],
|
|
},
|
|
generateHTML: (outputUrl) => `<meta property="og:image" content="${outputUrl}">`
|
|
});
|
|
} |