Every listing and category page gets its own 1200×630 Open Graph image, rendered during
pnpm build. seo.ogImages: 'generated' is the default; 'static' points every page at
public/og-default.png instead.
-
Leave
seo.ogImageson'generated', or set it.site.config.ts seo: {ogImages: 'generated',ogScope: { listings: true, categories: true, pseo: false },},pnpm check:configanswerssite.config.ts OK — <name> (<url>); …. -
Regenerate the fallback — the shipped one carries the demo’s name.
Terminal pnpm og:defaultpublic/og-default.png: 1200×630, N bytes — "<site.name>" (<site.tagline>)pnpm og:default --checkexits 1 withpublic/og-default.png is out of date — run: pnpm og:default. -
Build and read the
og:lines; checkfallbacks=0.Terminal pnpm buildog: N images to produce (L listings, C categories, 0 pseo, 1 default)og: rendered N images in S s (cache hits H)[zerodirs:og] engine=native, rendered=R, fallbacks=0, logos … / satori … / resvg …; cache=node_modules/.cache/zerodirs/og/ (…) -
Open
https://<your domain>/og/<listingBase>/<slug>.png— on the demo,/og/tools/chatgpt.png.
Verify
Section titled “Verify”| Where | You should see | |
|---|---|---|
| The count | the build output | og: N images to produce (…), then fallbacks=0 |
| The image | https://<your domain>/og/<listingBase>/<slug>.png |
a 1200×630 PNG with that listing’s name and logo |
| The tag | view-source:https://<your domain>/<listingBase>/<slug>/ |
<meta property="og:image" content="https://<your domain>/og/<listingBase>/<slug>.png">, with og:image:width 1200 |
| The fallback | pnpm og:default --check |
public/og-default.png is up to date (N bytes, "<site.name>") |
Worth knowing
Section titled “Worth knowing”- Images are written during the build; a listing change needs a rebuild.
/og/<listingBase>/<slug>.pngfor a listing,/og/<categoryBase>/<slug>.pngfor a category,/og/<slug>.pngfor a generated page,/og/default.pngfor everything else.OG_RENDERER=wasmin.envis a build-time variable, never read fromwrangler.jsonc.- Cached in
node_modules/.cache/zerodirs/og/: a logo edited in place keeps its hash, so delete that directory to force a render. Workers Builds keeps no cache, so a git-push deploy re-renders everything.
When it is off or degraded
Section titled “When it is off or degraded”| Config state | The visitor sees | /admin/ reports |
Fix |
|---|---|---|---|
seo.ogImages: 'static' |
public/og-default.png on every page |
nothing | expected; run pnpm og:default |
| a render fails | the fallback bytes; [zerodirs:og] <path>: render failed (…); serving public/og-default.png instead, fallbacks=N |
nothing | fix the cause and rebuild |
| the native addon does not load | the same images, slower: [zerodirs:og] @resvg/resvg-js could not be loaded (…); falling back to @resvg/resvg-wasm (set OG_RENDERER=wasm to silence) |
nothing | set OG_RENDERER=wasm in .env |
| a font file is missing | render failed (og: font <path> is missing …), fallbacks=N; pnpm og:default refuses to write |
nothing | restore src/assets/fonts/og/ |
public/og-default.png is missing |
under 'static' every og:image is a 404; under 'generated' the first failed render stops the build with og: fallback image <file> is missing (…) |
nothing | pnpm og:default |
seo.ogScope.pseo: true |
one PNG per generated page, against the plan file limit | nothing | turn it off when the budget warns |
Configuration
Section titled “Configuration”seo.ogImages, the three seo.ogScope switches, theme.preset and theme.tokens.primary — seo, theme. One catch: a hex theme.tokens.primary reaches the image, an oklch() value does not.
Directorysrc/
Directorypages/og/ the prerendered endpoint and the
og:count line- …
Directoryfeatures/og/
- template.ts the satori layout and
OG_TEMPLATE_VERSION - render.ts satori, resvg, the wasm and render-failed fallbacks
- specs.ts which pages get an image
- cache.ts the content-hash cache
- fonts.ts the Inter faces
- template.ts the satori layout and
Directoryassets/fonts/og/ Inter Regular and Bold, TTF
- …
- scripts/og-default.ts
pnpm og:defaultand--check - public/og-default.png the fallback and the static image