Repository navigation
feat(seo): 🚀 generated social cards (og:image) with Takumi - #927
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 24827cb7ff
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const card = | ||
| hidden || slug === null | ||
| ? null | ||
| : contentGeneratedOgImage(c, definition, { |
There was a problem hiding this comment.
Avoid advertising cards that the image route refuses to serve
When an access family has any restrictive rule—for example, one private forum or a members-only commenting rule—delivery metadata still advertises a generated image here, but /delivery/og/{slug} rejects it through isContentAccessShareable in delivery-routes.ts. That predicate checks every action across the entire family (isContentAccessFamilyOpen), so even publicly readable topics receive image URLs that always return 404. The forum page then selects this broken image instead of the working site fallback. Apply the image route's availability condition when producing metadata, or make the route authorize anonymous reading of the individual record.
Useful? React with 👍 / 👎.
24827cb to
e13fd08
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e13fd089f1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!user) return c.json({ error: "User not found" }, 404); | ||
|
|
||
| const props = profileCardProps(c, user); |
There was a problem hiding this comment.
Reject profile cards for accounts pending deletion
When a member has a pending or failed account-deletion request, the public profile handler in packages/api/src/modules/users/routes/profile.route.ts deliberately returns 404 to other viewers via findOpenAccountDeletion. This new endpoint only checks whether the user exists, so anonymous requests can still retrieve a card containing that hidden member's name, headline and cover, including through previously advertised card URLs. Apply the deletion check before rendering and publicly caching the card.
Useful? React with 👍 / 👎.
Page heads
- Every page with a title emits og:title, og:description, og:type,
og:site_name, og:url, og:locale (+ og:locale:alternate), og:image (with
type, size and alt) and the twitter:* card tags; `metadata.twitterSite`
adds twitter:site. `canonical` and `openGraph` are accepted by plugin
route heads, and delivered content pages pass their canonical URL and card.
- `metadata.ogImage` sets the default image (the generated site card, a URL,
or `false`). Pages without their own image get the site card drawn with
their own title and description; `openGraph.imageCategory` adds a coloured
label and `openGraph.imageLayout` picks `headline` or `quote`.
- `documentSocialMeta` fills og:url and og:locale from the root route.
Cards
- The API draws 1200 × 630 PNG cards with Takumi on Node.js and Cloudflare
Workers, with bundled Geist fonts (Latin, Latin Extended, Cyrillic) and no
network access: content (`/delivery/og/{slug}` per content type), member
profiles (`/og/users/{nameCode}`) and the site (`/og/site`).
- Versioned URLs (`v`) are cached for a year, stale ones for an hour; only
public, visible records and existing members are drawn.
- Content Engine: `delivery.seo.openGraph.imageField` with
`generateImage: false` uses the record's cover as og:image.
- `ogImage` API config: enabled, fonts, theme, template, templates per
content type, version and `logo` (SVG or data URI; `VITNODE_LOGO_SVG` and
`VITNODE_ICON_SVG` ship with core); plugins register templates with
`buildApiPlugin({ ogImageTemplates })`.
Design
- Logo (or icon + site name) at the top, the title as the headline with the
description under it, an optional category label, and a soft accent glow
on the right (`OgBrand`, `OgText`, `OgGlow`). Theme: the web app's dark
tokens.
Plugins and apps
- Blog, forum topics and newsroom events get cards. The demo apps use the
VitNode wordmark.
- Marketing pages (home, plugins, solutions) load localized titles and
descriptions for their heads and structured data; docs pages label their
cards with their section.
- Docs: new Social images page; Content Engine SEO, route module and
configuration pages updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
028cdd1 to
a96117b
Compare
Page heads
og:site_name, og:url, og:locale, og:image (with type, size and alt) and
twitter:card;
canonicalandopenGraphare accepted by plugin routeheads, and delivered content pages pass their canonical URL and card.
metadata.ogImagesets the default image (the generated site card, a URL,or
false).Cards
Workers, with bundled Geist fonts (Latin, Latin Extended, Cyrillic) and no
network access: content (
/delivery/og/{slug}per content type), memberprofiles (
/og/users/{nameCode}) and the site (/og/site).v) are cached for a year, stale ones for an hour; onlypublic, visible records and existing members are drawn.
delivery.seo.openGraph.imageFieldis the cover behindthe card (
generateImage: falseuses it as og:image instead); covers andprofile covers are read from storage, and their file id is part of the
card version.
ogImageAPI config: enabled, fonts, theme, template, templates percontent type, version and
logo(SVG or data URI;VITNODE_LOGO_SVGandVITNODE_ICON_SVGship with core); plugins register templates withbuildApiPlugin({ ogImageTemplates }).Design (decided from prototype rounds of 25+ variants)
title signs it; profiles quote the headline and sign with name and avatar.
in along a smoothstep curve; drawn at 82% brightness.
Brutal, Hexgrid, Watermark, Broadcast, Swiss, Thread; quote riffs Light,
Mark, Rule, Speaker, Brand; cover layouts Split, Inset, Band, Duotone; a
blurred full-bleed backdrop (hid the cover) and a logo on the cover.
Plugins and apps
apps use the VitNode wordmark.
configuration pages updated.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01CnAiFbNcH9MjiCNhLJu5hq