From ad8d68bb49ca60f29c1d3b558b7f1e81a229d525 Mon Sep 17 00:00:00 2001 From: Thomas <28439359+thoda-dev@users.noreply.github.com> Date: Mon, 31 Aug 2026 20:44:35 +0200 Subject: [PATCH] fix(seo): keep the preview image on the home page only --- apps/app/app/app.vue | 8 ++------ apps/app/app/pages/index.vue | 11 +++++++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/apps/app/app/app.vue b/apps/app/app/app.vue index 5b71240..64cb7e2 100644 --- a/apps/app/app/app.vue +++ b/apps/app/app/app.vue @@ -16,12 +16,8 @@ useSeoMeta({ ogType: 'website', ogSiteName: 'shhh', ogUrl: () => url.href, - // Absolute, not `/og-image.png`: every unfurler resolves it against nothing and needs the origin. - ogImage: () => `${url.origin}/og-image.png`, - ogImageWidth: 1200, - ogImageHeight: 630, - twitterCard: 'summary_large_image', - twitterImage: () => `${url.origin}/og-image.png`, + // No card image here: `pages/index.vue` adds one for the home page alone, so a shared paste link unfurls small instead of eating the conversation it lands in. + twitterCard: 'summary', twitterTitle: t('seo.title'), twitterDescription: t('seo.description') }) diff --git a/apps/app/app/pages/index.vue b/apps/app/app/pages/index.vue index f53ad0f..8033101 100644 --- a/apps/app/app/pages/index.vue +++ b/apps/app/app/pages/index.vue @@ -3,6 +3,17 @@ import type { TabsItem } from '@nuxt/ui' const { t } = useI18n() const localePath = useLocalePath() +const url = useRequestURL() + +// The large preview card is the home page's alone — every other route, a paste above all, keeps the compact one set in `app.vue`. +useSeoMeta({ + // Absolute, not `/og-image.png`: every unfurler resolves it against nothing and needs the origin. + ogImage: () => `${url.origin}/og-image.png`, + ogImageWidth: 1200, + ogImageHeight: 630, + twitterCard: 'summary_large_image', + twitterImage: () => `${url.origin}/og-image.png` +}) await ensureAuthSessionLoaded() const user = useAuthUser()