Add dynamic SEO metadata and translations

This commit is contained in:
2026-04-13 13:02:02 +03:00
parent b30376aa1d
commit cc7b5db35e
3 changed files with 76 additions and 3 deletions

View File

@@ -2,16 +2,77 @@ import { Oswald } from "next/font/google";
import "../globals.css"; import "../globals.css";
import { getDictionary } from "../dictionaries"; import { getDictionary } from "../dictionaries";
import { Metadata, Viewport } from "next";
const oswald = Oswald({ const oswald = Oswald({
subsets: ["latin", "latin-ext"], subsets: ["latin", "latin-ext"],
variable: "--font-oswald", variable: "--font-oswald",
}); });
export async function generateMetadata({ params }: { params: Promise<{ lang: string }> }) { export const viewport: Viewport = {
themeColor: '#ffffff',
width: 'device-width',
initialScale: 1,
maximumScale: 5,
};
export async function generateMetadata({ params }: { params: Promise<{ lang: string }> }): Promise<Metadata> {
const resolvedParams = await params; const resolvedParams = await params;
const lang = resolvedParams.lang as "en" | "tr";
const dict = await getDictionary(lang);
const siteUrl = "https://salmakis.com.tr";
return { return {
title: "Salmakis Group | Luxury Resort, Villas & Yachting", title: dict.seo.title,
description: "Salmakis Group Gateway", description: dict.seo.description,
keywords: dict.seo.keywords,
metadataBase: new URL(siteUrl),
alternates: {
canonical: `/${lang}`,
languages: {
'tr-TR': '/tr',
'en-US': '/en',
},
},
openGraph: {
title: dict.seo.title,
description: dict.seo.description,
url: `${siteUrl}/${lang}`,
siteName: 'Salmakis Group',
images: [
{
url: '/1.jpg',
width: 1200,
height: 630,
alt: 'Salmakis Group Resort',
},
],
locale: lang === 'tr' ? 'tr_TR' : 'en_US',
type: 'website',
},
twitter: {
card: 'summary_large_image',
title: dict.seo.title,
description: dict.seo.description,
images: ['/1.jpg'],
},
robots: {
index: true,
follow: true,
googleBot: {
index: true,
follow: true,
'max-video-preview': -1,
'max-image-preview': 'large',
'max-snippet': -1,
},
},
icons: {
icon: '/favicon_io/favicon-32x32.png',
apple: '/favicon_io/apple-touch-icon.png',
},
manifest: '/favicon_io/site.webmanifest',
}; };
} }

View File

@@ -27,5 +27,11 @@
"title": "Yachting", "title": "Yachting",
"subtitle": "Aegean Elegance" "subtitle": "Aegean Elegance"
} }
},
"seo": {
"title": "Salmakis Group | Luxury Resort, Villas & VIP Yachting",
"description": "A heritage of excellence since 1980. Discover luxury resort stays, private villas, and unforgettable yachting experiences in the Aegean with Salmakis Group.",
"keywords": "Salmakis, Salmakis Resort, Salmakis Villas, Salmakis Yachting, Bodrum luxury hotel, Aegean yacht charter, private villa holidays, Bodrum marina yacht"
} }
} }

View File

@@ -27,5 +27,11 @@
"title": "Yachting", "title": "Yachting",
"subtitle": "Ege Zarafeti" "subtitle": "Ege Zarafeti"
} }
},
"seo": {
"title": "Salmakis Group | Lüks Otel, Villalar ve VIP Yatçılık",
"description": "1980'den bugüne muazzam bir mükemmellik mirası. Salmakis Group ile lüks resort konaklamaları, özel villalar ve Ege'de unutulmaz yat deneyimlerini keşfedin.",
"keywords": "Salmakis, Salmakis Resort, Salmakis Villas, Salmakis Yachting, Bodrum lüks otel, Ege yat kiralama, özel villa tatili, Bodrum marina yat"
} }
} }