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',
			},
			],
		},
		generateHTML: (outputUrl) => `<meta property="og:image" content="${outputUrl}">`
	});
}