Replace static OG image with auto-generated JPEG using site fonts

Add scripts/generate-og-image.js that renders the OG image with Playwright
using the actual site fonts (Cormorant Garamond, Instrument Sans, Space
Grotesk) and dynamically counts skills/commands from source/. Switch from
PNG to JPEG (512 KB → 25 KB). Run with `bun run og-image`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Paul Bakaus
2026-03-04 09:52:14 -08:00
co-authored by Claude Opus 4.6
parent 98f5d839fd
commit a94e237359
7 changed files with 218 additions and 36 deletions
+1 -1
View File
@@ -137,7 +137,7 @@ async function build() {
await buildStaticSite();
// Copy root-level static assets that need stable (unhashed) URLs
const staticAssets = ['og-image.png', 'robots.txt', 'sitemap.xml', 'favicon.svg', 'apple-touch-icon.png'];
const staticAssets = ['og-image.jpg', 'robots.txt', 'sitemap.xml', 'favicon.svg', 'apple-touch-icon.png'];
const buildDir = path.join(ROOT_DIR, 'build');
for (const asset of staticAssets) {
const src = path.join(ROOT_DIR, 'public', asset);