slimcore-website/scripts/generate-og.mjs

22 lines
1.6 KiB
JavaScript
Raw Normal View History

// Generates public/og-default.png — 1200x630, dark, with Persimmon highlight on "Grenzenlos".
// Run: node scripts/generate-og.mjs
import sharp from 'sharp';
import { writeFileSync } from 'node:fs';
const svg = `
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="630" viewBox="0 0 1200 630">
<rect width="1200" height="630" fill="#0E0F14"/>
<text x="80" y="100" font-family="JetBrains Mono, monospace" font-weight="500" font-size="20" fill="#FF6B2C" letter-spacing="2"> SLIMCORE</text>
<text x="80" y="320" font-family="Source Serif 4, Georgia, serif" font-weight="500" font-size="84" fill="#F5F5F0" letter-spacing="-1.5">Schlank starten.</text>
<rect x="68" y="358" width="430" height="98" fill="#FF6B2C"/>
<text x="80" y="430" font-family="Source Serif 4, Georgia, serif" font-weight="500" font-size="84" fill="#2A0F02" letter-spacing="-1.5">Grenzenlos</text>
<text x="510" y="430" font-family="Source Serif 4, Georgia, serif" font-weight="500" font-size="84" fill="#F5F5F0" letter-spacing="-1.5">wachsen.</text>
<text x="80" y="540" font-family="Inter, sans-serif" font-weight="400" font-size="22" fill="#F5F5F0" opacity="0.75">Schlanke Geschäftssoftware für Solo-Selbstständige und kleine Teams.</text>
<text x="80" y="585" font-family="JetBrains Mono, monospace" font-weight="500" font-size="14" fill="#F5F5F0" opacity="0.55" letter-spacing="1.5">SLIMCORE.IO · IN DEUTSCHLAND GEHOSTET · OPEN SOURCE</text>
</svg>
`;
const buffer = await sharp(Buffer.from(svg)).png().toBuffer();
writeFileSync('public/og-default.png', buffer);
console.log('✓ public/og-default.png generated (1200×630)');