Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions apps/app/app/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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')
})
Expand Down
11 changes: 11 additions & 0 deletions apps/app/app/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down