feat: SEO enhancements — server metadata, sitemap, robots, dynamic base URL

- Split all page.tsx files into server wrapper (metadata export) + client.tsx (Apollo/interactive)
- Add robots.ts and sitemap.ts (tournaments, teams, players)
- Add metadataBase, OpenGraph and Twitter card metadata to root layout
- Replace hardcoded worldcup.pivoine.art with NEXT_PUBLIC_SITE_URL env var (sitemap/robots) and relative paths (page metadata, resolved by Next.js against metadataBase)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-15 20:18:36 +02:00
parent 2bd32daae1
commit a494c80a76
19 changed files with 1968 additions and 1770 deletions
+19 -5
View File
@@ -8,17 +8,31 @@ import { AppApolloProvider } from '@/components/apollo-provider'
const bebasNeue = Bebas_Neue({ weight: '400', subsets: ['latin'], variable: '--font-bebas' })
const spaceGrotesk = Space_Grotesk({ subsets: ['latin'], variable: '--font-space' })
const BASE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? 'http://localhost:3000'
export const metadata: Metadata = {
title: { default: 'World Cup', template: '%s · World Cup' },
description: 'Comprehensive World Cup statistics from 1930 to 2026',
metadataBase: new URL(BASE_URL),
title: { default: 'World Cup Stats', template: '%s · World Cup' },
description: 'Live scores, group standings, results and statistics for every FIFA World Cup from 1930 to 2026.',
keywords: ['World Cup', 'FIFA', 'football', 'soccer', 'statistics', 'live scores', 'standings', '2026'],
openGraph: {
type: 'website',
siteName: 'World Cup Stats',
url: '/',
title: 'World Cup Stats',
description: 'Live scores, group standings, results and statistics for every FIFA World Cup from 1930 to 2026.',
},
twitter: {
card: 'summary',
title: 'World Cup Stats',
description: 'Live scores, group standings, results and statistics for every FIFA World Cup from 1930 to 2026.',
},
icons: {
icon: [
{ url: '/favicon.svg', type: 'image/svg+xml' },
{ url: '/favicon-32x32.png', sizes: '32x32', type: 'image/png' },
],
apple: [
{ url: '/apple-touch-icon.png', sizes: '180x180', type: 'image/png' },
],
apple: [{ url: '/apple-touch-icon.png', sizes: '180x180', type: 'image/png' }],
},
}