chore: clean up scratch files and apply remaining updates
This commit is contained in:
+46
-6
@@ -8,6 +8,7 @@ import { routing } from '@/i18n/routing';
|
||||
import { headers } from 'next/headers';
|
||||
import Navbar from '@/components/Navbar';
|
||||
import Footer from '@/components/Footer';
|
||||
import { SITE_URL, buildAlternates, ogLocale } from '@/lib/seo';
|
||||
import "../globals.css";
|
||||
|
||||
const unbounded = Unbounded({
|
||||
@@ -28,16 +29,55 @@ const ibmPlexMono = IBM_Plex_Mono({
|
||||
weight: ["400", "500"],
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Marmaris Local — Yerel Rehber",
|
||||
description: "Marmaris'in en iyi yerel mekanları, restoranları ve saklı apart otelleri.",
|
||||
manifest: "/manifest.json",
|
||||
};
|
||||
|
||||
export function generateStaticParams() {
|
||||
return routing.locales.map((locale) => ({locale}));
|
||||
}
|
||||
|
||||
export async function generateMetadata({
|
||||
params
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}): Promise<Metadata> {
|
||||
const { locale } = await params
|
||||
const headersList = await headers();
|
||||
const pathname = headersList.get('x-pathname') || `/${locale}`;
|
||||
|
||||
const title =
|
||||
locale === 'en'
|
||||
? 'Marmaris Local — Local Guide, Not the Tourist Trail'
|
||||
: locale === 'ru'
|
||||
? 'Marmaris Local — Местный гид по Мармарису'
|
||||
: 'Marmaris Local — Yerel Rehber';
|
||||
|
||||
const description =
|
||||
locale === 'en'
|
||||
? "Marmaris' best local spots — restaurants, apart hotels and businesses, curated and locally approved."
|
||||
: locale === 'ru'
|
||||
? 'Лучшие места Мармариса — рестораны, апарт-отели и заведения, проверенные местными жителями.'
|
||||
: "Marmaris'in en iyi yerel mekanları, restoranları ve saklı apart otelleri.";
|
||||
|
||||
return {
|
||||
title,
|
||||
description,
|
||||
metadataBase: new URL(SITE_URL),
|
||||
manifest: '/manifest.json',
|
||||
alternates: buildAlternates(pathname),
|
||||
openGraph: {
|
||||
title,
|
||||
description,
|
||||
url: `${SITE_URL}${pathname}`,
|
||||
siteName: 'Marmaris Local',
|
||||
locale: ogLocale(locale),
|
||||
type: 'website',
|
||||
},
|
||||
twitter: {
|
||||
card: 'summary_large_image',
|
||||
title,
|
||||
description,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export default async function RootLayout({
|
||||
children,
|
||||
params
|
||||
|
||||
Reference in New Issue
Block a user