mirror of
https://github.com/andwati/andwati.com.git
synced 2026-11-19 07:05:15 +00:00
Auto-generate per-post OG images
Renders a 1200x630 social card per post (satori + resvg-js, using the site's own self-hosted fonts) instead of reusing one generic og-image.png for every post. Wired into npm run build via a new generate:og step; templates/page.html falls back to the per-slug image unless extra.image is set, and non-post pages keep the generic fallback.
This commit is contained in:
+5
-1
@@ -2,11 +2,15 @@
|
||||
"name": "andwati-com",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@resvg/resvg-js": "^2.6.2",
|
||||
"satori": "^0.29.0",
|
||||
"wawoff2": "^2.0.1",
|
||||
"wrangler": "^4"
|
||||
},
|
||||
"scripts": {
|
||||
"generate:llms": "node scripts/generate-llms.mjs",
|
||||
"build": "npm run generate:llms && zola build",
|
||||
"generate:og": "node scripts/generate-og-images.mjs",
|
||||
"build": "npm run generate:llms && npm run generate:og && zola build",
|
||||
"deploy": "npm run build && wrangler deploy"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user