Skip to content

feat(seo): 🚀 generated social cards (og:image) with Takumi - #927

Merged
aXenDeveloper merged 1 commit into
canaryfrom
claude/serene-goodall-bkfce9
Nov 23, 2026
Merged

aXenDeveloper merged 1 commit into
canaryfrom
claude/serene-goodall-bkfce9

Conversation

@aXenDeveloper

Copy link
Copy Markdown
Owner

Page heads

  • Every page with a title emits og:title, og:description, og:type,
    og:site_name, og:url, og:locale, og:image (with type, size and alt) and
    twitter:card; 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).

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 is the cover behind
    the card (generateImage: false uses it as og:image instead); covers and
    profile covers are read from storage, and their file id is part of the
    card version.
  • 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 (decided from prototype rounds of 25+ variants)

  • Pull quote: the logo heads the card, the description is the quote, the
    title signs it; profiles quote the headline and sign with name and avatar.
  • The cover fills the right 820 px, solid under the quote column, then fades
    in along a smoothstep curve; drawn at 82% brightness.
  • Theme: the web app's dark tokens.
  • Rejected: Quiet, Editorial, Brand, Split, Terminal, Aurora, Poster,
    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

  • Blog uses its cover; forum topics and newsroom events get cards. The demo
    apps use the VitNode wordmark.
  • Docs: new Social images page; Content Engine SEO, route module and
    configuration pages updated.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01CnAiFbNcH9MjiCNhLJu5hq

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T18:57:47.388878Z a96117b New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the 💡 Feature A new feature label Nov 17, 2026
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit a96117b.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +277 to +280
const card =
hidden || slug === null
? null
: contentGeneratedOgImage(c, definition, {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@aXenDeveloper
aXenDeveloper force-pushed the claude/serene-goodall-bkfce9 branch from 24827cb to e13fd08 Compare November 23, 2026 11:56

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +56 to +58
if (!user) return c.json({ error: "User not found" }, 404);

const props = profileCardProps(c, user);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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>
@aXenDeveloper
aXenDeveloper force-pushed the claude/serene-goodall-bkfce9 branch from 028cdd1 to a96117b Compare November 23, 2026 18:56
@aXenDeveloper
aXenDeveloper merged commit d8c4b53 into canary Nov 23, 2026
4 checks passed
@aXenDeveloper
aXenDeveloper deleted the claude/serene-goodall-bkfce9 branch November 23, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💡 Feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant