From 140c94337e052c6d5022ae66a3a0f9287f9d3ad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20S=C3=B6derberg?= Date: Wed, 6 May 2026 18:12:37 +0200 Subject: [PATCH] SEO optimizations --- app/beach/BeachClientPage.tsx | 4 +- app/beach/page.tsx | 83 +++++++++++++++++++++++++-- app/components/HomeClientContent.tsx | 17 +++--- app/layout.tsx | 5 +- app/page.tsx | 61 +++++++++++++++++--- public/images/beach-tournament.webp | Bin 0 -> 1314972 bytes 6 files changed, 145 insertions(+), 25 deletions(-) create mode 100644 public/images/beach-tournament.webp diff --git a/app/beach/BeachClientPage.tsx b/app/beach/BeachClientPage.tsx index 898a3ae..2d619ef 100644 --- a/app/beach/BeachClientPage.tsx +++ b/app/beach/BeachClientPage.tsx @@ -61,7 +61,7 @@ export default function BeachClientPage({ config, turnstileSiteKey }: { config: Mat- & Sommarfesten @@ -123,7 +123,7 @@ export default function BeachClientPage({ config, turnstileSiteKey }: { config:

{timeInfo.dateStr}

{timeInfo.matchStr}

- Samtidigt som Höganäs Mat- & Sommarfest + Samtidigt som Höganäs Mat- & Sommarfest

diff --git a/app/beach/page.tsx b/app/beach/page.tsx index 49b06aa..e187dcc 100644 --- a/app/beach/page.tsx +++ b/app/beach/page.tsx @@ -1,17 +1,88 @@ // app/beach/page.tsx +import { Metadata } from 'next'; import { getConfig } from '../lib/config'; import BeachClientPage from './BeachClientPage'; export const dynamic = 'force-dynamic'; -export const metadata = { - title: 'Beachturnering', -}; +export async function generateMetadata(): Promise { + const config = await getConfig(); + const matchDate = new Date(config.beachPage.matchStart); + const year = matchDate.getFullYear(); + const dateFormatted = matchDate.toLocaleDateString('sv-SE', { day: 'numeric', month: 'long' }); + + const isClosed = config.beachPage.isClosedOverride; + const title = isClosed + ? `Höganäs Beach Open ${year} (Fulltecknat)` + : `Anmälan: Höganäs Beach Open ${year} - ${dateFormatted}`; + + const description = isClosed + ? `Turneringen den ${dateFormatted} är nu fullbokad. Välkommen ner till Kvickbadet för att titta på beachvolleyboll i toppklass!` + : `Välkommen till Höganäs Beach Open den ${dateFormatted}! Turneringsinfo, regler och anmälan för beachvolleyboll vid Kvickbadet.`; + + return { + title: title, + description: description, + openGraph: { + title: title, + description: description, + url: 'https://lerbergetsvolleyboll.se/beach', + siteName: 'Lerbergets Volleybollsällskap', + locale: 'sv_SE', + type: 'website', + images: [ + { + url: '/images/beach-tournament.webp', + width: 1200, + height: 630, + alt: `Höganäs Beach Open ${year}`, + }, + ], + }, + twitter: { + card: 'summary_large_image', + title: title, + description: description, + images: ['/images/beach-tournament.webp'], + }, + }; +} export default async function BeachPage() { const config = await getConfig(); - const turnstileSiteKey = process.env.TURNSTILE_SITE_KEY || ''; - return ; -} + const jsonLd = { + '@context': 'https://schema.org', + '@type': 'Event', + 'name': 'Höganäs Beach Open', + 'startDate': config.beachPage.matchStart, + 'location': { + '@type': 'Place', + 'name': 'Kvickbadet', + 'address': { + '@type': 'PostalAddress', + 'addressLocality': 'Höganäs', + 'addressCountry': 'SE', + }, + }, + 'eventStatus': config.beachPage.isClosedOverride + ? 'https://schema.org/EventScheduled' + : 'https://schema.org/EventScheduled', + 'organizer': { + '@type': 'Organization', + 'name': 'Lerbergets Volleybollsällskap', + 'url': 'https://lerbergetsvolleyboll.se' + } + }; + + return ( + <> +