2024-10-06 11:36:54 +00:00
|
|
|
import fs from 'node:fs';
|
|
|
|
import ogImagePlugin from 'eleventy-plugin-og-image';
|
2024-01-02 12:32:41 +00:00
|
|
|
|
2024-10-06 11:36:54 +00:00
|
|
|
export default function (eleventyConfig) {
|
2024-01-02 12:32:41 +00:00
|
|
|
eleventyConfig.addPlugin(ogImagePlugin, {
|
|
|
|
satoriOptions: {
|
|
|
|
fonts: [
|
|
|
|
{
|
|
|
|
name: 'Space Grotesk',
|
|
|
|
data: fs.readFileSync('./src/assets/fonts/SpaceGrotesk-Regular.ttf'),
|
|
|
|
weight: 500,
|
|
|
|
style: 'normal',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2024-03-14 08:03:45 +00:00
|
|
|
generateHTML: (outputUrl) => `<meta property="og:image" content="${outputUrl}">`
|
2024-01-02 12:32:41 +00:00
|
|
|
});
|
|
|
|
}
|