Weekly Planner
API

OG & share-meta

Dynamic Open Graph images and crawler-only HTML for shared planners.

OG & share-meta

Shared helpers: src/server/og-meta.js.

/api/og (api/og.js)

  • Runtime: Node
  • Query:
    • title — board name, sanitized/capped to 24 chars
    • owner — short display name (never a raw email)
    • n — total event count for the subtitle
    • e — base64url payload of Mon–Fri events clipped to 09:00–15:00 (presence of e selects the real schedule; omit it for the demo grid)
    • locked=1 — password shares: empty grid + Lucide lock
  • Same card chrome as before (mark + title + week grid). Open shares swap the muted tagline for {owner} · {n}개 일정 and paint real event blocks.
  • @vercel/og ImageResponse with Pretendard .woff fonts (Satori does not support woff2)
  • Fonts cached in module-level promise
  • Writes into Node res (returning the response object alone can hang on Vercel Node)

/api/share-meta (api/share-meta.js)

Crawler HTML for share links:

  1. Extract token
  2. Admin query share + board + owner.settings + events
  3. resolveShareOgCard / buildOgImageUrl
  4. renderShareOgHtml with absolute OG/Twitter tags

Privacy

Share stateOG title / description / image
Open + enabledBoard name, owner label, real schedule snippet
PasswordGeneric “password required” — no board name, owner, or events; empty grid + lock
Disabled / missingGeneric defaults (demo grid)

Also: HTML escaping for all dynamic meta content; SOCIAL_CRAWLER_RE / isSocialCrawler for middleware.

On this page