Skip to content

docs site: Open Graph images are generated for all 403 pages but no page references them #12235

Description

@os-zhuang

One-liner

app/og/docs/[...slug]/route.tsx renders a 1200×630 card per page and generateStaticParams builds one for every doc page — and nothing links to any of them. The build pays for 403 images that no crawler, no social platform and no user ever sees. Every page shares as a blank card.

Measured

$ grep -rn "getPageImage\|openGraph\|twitter" apps/docs --include=*.ts --include=*.tsx | grep -v node_modules
apps/docs/app/og/docs/[...slug]/route.tsx:1:import { getPageImage, source } from '@/lib/source';
apps/docs/app/og/docs/[...slug]/route.tsx:31: slug: getPageImage(page).segments,
apps/docs/lib/source.ts:18:export function getPageImage(page: InferPageType<typeof source>) {

getPageImage is called only by the route that produces the image. No openGraph, no twitter key exists anywhere in the app. Rendered page: og: property count = 0.

Expected

In generateMetadata for doc pages:

  • openGraph: { title, description, url: page.url, type: 'article', images: [getPageImage(page).url] }
  • twitter: { card: 'summary_large_image', title, description, images: [...] }

The homepage and the blog need the same treatment; the homepage can reuse hero-cover-dark.png (already in public/) rather than the docs card generator.

Depends on the metadataBase card — without it the image URLs resolve relative to nothing.

Acceptance

  • a doc page emits og:title, og:description, og:url, og:image and twitter:card
  • og:image fetches 200 as an image (not HTML)
  • the homepage emits its own card, distinct from the docs template

Source

Found in an SEO review of the docs site (apps/docs) run on 2026-08-25, measured against the local dev server and against production. The canonical origin is https://objectstack.ai — maintainer ruling recorded in #10659:

这个仓的文档站规范 URL 是 https://objectstack.ai

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions