Skip to content

fix(seo): keep the preview image on the home page only - #36

Merged
thoda-dev merged 1 commit into
masterfrom
remove-image-from-preview-on-other-pages-than-home
Aug 31, 2026
Merged

fix(seo): keep the preview image on the home page only#36
thoda-dev merged 1 commit into
masterfrom
remove-image-from-preview-on-other-pages-than-home

Conversation

@thoda-dev

Copy link
Copy Markdown
Owner

What this changes

Closes #35

The card image and the large Twitter card move out of app.vue and into pages/index.vue, so only the home page unfurls with the logo. Everywhere else twitter:card is now summary and no image is declared, which gives a compact two-line preview.

Why

Every route shared the app-wide meta, so a paste link expanded into a 1200×630 block that pushed the conversation off screen — carrying a title and description identical for every paste, so the space bought the reader nothing. Issue #35 has the longer version.

Two things about the shape of the fix:

It is home-page-only, not everything-but-/p/. The legal pages and the auth screens have no more use for a full-width logo than a paste does, and a rule with one exception ages better than a rule with a growing list of them. pages/index.vue covers /, /fr and every other locale prefix, since they all resolve to that page.

twitter:card drops to summary rather than being removed. Twitter needs a card type to render a preview at all, and summary is the compact one. Discord and Slack ignore it and simply find no image to draw.

Nothing about what the tags say changes: title, description, og:url and the canonical are still set once in app.vue, still deliberately silent about the paste, and Disallow: /p/ is untouched.

Checks

  • pnpm lint, pnpm typecheck and pnpm test pass
  • Schema change? A migration is committed alongside it (pnpm db:generate) — no schema change
  • Touches crypto, authorization, or the paste read counter? Say so here — those get a closer read

None of the three. No server code changes, no i18n key is added or removed, and the change is entirely which <meta> tags each route emits.

Worth knowing when reviewing: Discord, Slack and Twitter cache unfurls for a while, so an already-shared link keeps its old large preview until their cache expires. Fresh links show the new behaviour immediately.

AI assistance

See CONTRIBUTING.md. Disclosure is not held against you: it tells
the reviewer where to look hardest.

  • No AI tool was used
  • An AI tool was used — which one, and roughly how much of the change: Claude Code, all of it. I described the problem from a Discord screenshot, it found the meta block and made the split; the home-page-only scope was my call.

No test covers this — the suite is unit tests over pure logic and none of them renders a page — so it was checked by reading the emitted head. Worth confirming by hand against a real unfurler on both a home link and a paste link.

Copilot AI lite review requested due to automatic review settings August 31, 2026 18:45

Copilot AI 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.

🟢 Approval recommended

The meta tags are now scoped so only the home page emits the large preview image, matching the stated SEO/unfurling behavior change without affecting other routes’ metadata beyond the intended defaults.

Pull request overview

Moves the large Open Graph/Twitter preview image configuration off the app-wide head and into the home page so only / (and locale-prefixed variants) unfurls with the large logo card, while all other routes use a compact summary Twitter card without an image.

Changes:

  • Removed app-wide og:image / twitter:image and switched the default twitter:card to summary in app.vue.
  • Added home-page-only useSeoMeta in pages/index.vue to restore og:image and summary_large_image for the home route.
File summaries
File Description
apps/app/app/pages/index.vue Adds home-only OG/Twitter image + summary_large_image meta using the request origin.
apps/app/app/app.vue Removes global card image meta and defaults twitter:card to summary for non-home routes.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@thoda-dev
thoda-dev merged commit 6cf8ba8 into master Aug 31, 2026
7 checks passed
@thoda-dev
thoda-dev deleted the remove-image-from-preview-on-other-pages-than-home branch August 31, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A shared paste link unfurls with the full preview image and swallows the conversation

2 participants