Add OG image auto-generation for writings, portfolio, and bookshelf

Replaces the legacy Zola script, which was hard-coded to the retired
"CASE FILE" branding, with scripts/generate-og-images.astro-site.mjs
built on the new design system's dark palette + Fraunces/JetBrains Mono.
Base.astro now renders og:image/twitter:image from a per-page ogImage
prop, wired into the writings and bookshelf detail pages.

Uses static-weight Fraunces/Newsreader font packages rather than the
variable fonts the site ships elsewhere, since satori's opentype.js
parser throws on their fvar table.
This commit is contained in:
2026-09-01 08:59:42 +03:00
parent 9ee9795645
commit c035aca132
32 changed files with 410 additions and 11 deletions
+16
View File
@@ -11,6 +11,12 @@ importers:
'@biomejs/biome':
specifier: ^2.5.11
version: 2.5.11
'@fontsource/fraunces':
specifier: ^5.3.0
version: 5.3.0
'@fontsource/newsreader':
specifier: ^5.3.0
version: 5.3.0
'@resvg/resvg-js':
specifier: ^2.6.2
version: 2.6.2
@@ -1026,9 +1032,15 @@ packages:
'@fontsource-variable/[email protected]':
resolution: {integrity: sha512-rrzYi43qMpbzwuFtf9OkWH8sxAPVPcQQQEwXpPtwaKYeJ8yVg5aLs5kawmo1f2Q1t1M38TLmEKCkGVDsYwgdFw==}
'@fontsource/[email protected]':
resolution: {integrity: sha512-LEHTOBiZufQzAvnAe2rZ8ZknbDS28Q9kzwb0L+gZJEmjLGr8hhZ/5NuHXwDuHBWhVXYoiGGXmrb0H6Ko/RrHTg==}
'@fontsource/[email protected]':
resolution: {integrity: sha512-fqDfB5I9f1p1TV486aUgB9t8zP84P0O1FtQR5Ol9vjwPy+S+EIGlVYm1cvj2W5shcZMTg2nZFdVMoH5wFu8a1A==}
'@fontsource/[email protected]':
resolution: {integrity: sha512-AFR6ZKY89GNL+9qBI2P2+66NhD5bhOj/v6fsLnFYLM4E0JnMB1yKb+Ro8cA64i1hwAWoBfTq5CHJGWH1toLDkw==}
'@formatjs/[email protected]':
resolution: {integrity: sha512-+QoPW4csYALsQIl8GbN14igZzDbuwzcpWrku9nyMXlaqAlwRBgl5V+p0vWMGFqHOw37czNXaP/lEk4wbLgcmtA==}
@@ -8813,8 +8825,12 @@ snapshots:
'@fontsource-variable/[email protected]': {}
'@fontsource/[email protected]': {}
'@fontsource/[email protected]': {}
'@fontsource/[email protected]': {}
'@formatjs/[email protected]':
dependencies:
'@formatjs/intl-localematcher': 0.5.4