Skip to content

feat(demos): show each demo's picture in its social card - #537

Merged
harlan-zw merged 1 commit into
mainfrom
feat/demo-og-images
Oct 7, 2026
Merged

harlan-zw merged 1 commit into
mainfrom
feat/demo-og-images

Conversation

@harlan-zw

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

None.

❓ Type of change

  • 📖 Documentation
  • 🐞 Bug fix
  • 👌 Enhancement
  • ✨ New feature
  • 🧹 Chore
  • ⚠️ Breaking change

📚 Description

A shared demo page unfurled into the generic text card, so a link to a film or a landing page showed only words. Each demo page now shares a card that shows what the Agent made: the film's poster frame or the page's first screen. A band above the picture carries the lockup, "What /{name} made" and the recording line. /skills/demos keeps its text card.

  • demoSocialPicture in app/utils/home-demos.ts picks the picture. A tall page uses its first-screen poster, because a full shot runs to 6000px. A demo with neither a film poster nor a one-screen desktop picture keeps the text card.
  • OgImage/Demo.takumi.vue draws the card. The picture fills a window from its top edge, so a page shows its header and hero. A long Skill name shrinks to stay on one line.
  • HomeDemoShot declares the poster field that /api/skill-demos already sends.
  • DESIGN.md lists the Demo card and why OgLayout does not frame it.

The page cannot point og:image at the media URL directly. app.vue defines a default card for every page, and nuxt-og-image gives that card's meta tagPriority: 35. Unhead ranks 35 above every priority alias, so a prebuilt url never replaces the default card. A takumi card replaces it through the same payload key.

Architecture after this change: the demo page picks a picture, and the OG renderer draws Demo.takumi with that picture from the media bucket

🤖 AI disclosure: Harlan Agent Kit modified this description. My AI open-source policy.

A shared demo page unfurled into a text card, so a link to a film or a
landing page showed only words. The card now shows the film's poster
frame or the page's first screen, under a band with the lockup, the
Skill name and the recording line.

A prebuilt og:image URL cannot replace the site default card from
app.vue: the generated card's meta carries tagPriority 35, which beats
every unhead alias. A takumi card goes through the same payload as the
default, so it replaces it.
@harlan-zw harlan-zw added the harlan-agent-review Pull request triage requires an adversarial Review. Adding this label manually always forces one. label Oct 7, 2026
@harlan-zw

Copy link
Copy Markdown
Collaborator Author

Agent check, by hand, since CI cannot render OG images (pnpm build, then wrangler dev on the build output):

  • All 21 demo pages emit an og:image for Demo.takumi. Each card renders as a 200 PNG, and each embedded media URL answers 200.
  • Tall pages embed their first-screen poster. No card embeds a full tall shot.
  • /skills/demos still emits Page.takumi with "See what skills make".
  • A 64-character Skill name stays on one line beside the lockup.
  • media.skilld.dev answers 200 to the Twitterbot, facebookexternalhit, LinkedInBot and Slackbot user agents.
Before (production) After
Before: the text card for /frontend-design After: the Demo card for /frontend-design, a landing page
UI component, one screen Film poster frame
The Demo card for /animate The Demo card for /hyperframes

@harlan-github-agent harlan-github-agent Bot added harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. and removed harlan-agent-review Pull request triage requires an adversarial Review. Adding this label manually always forces one. labels Oct 7, 2026
@harlan-zw
harlan-zw merged commit edebd17 into main Oct 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant