107 lines
2.9 KiB
TypeScript
107 lines
2.9 KiB
TypeScript
import type { Metadata } from "next";
|
|
import { Archivo, Space_Grotesk, IBM_Plex_Mono } from "next/font/google";
|
|
import "../globals.css";
|
|
import { Locale, i18n } from "@/i18n-config";
|
|
|
|
const archivo = Archivo({
|
|
subsets: ["latin"],
|
|
weight: ["300", "400", "500", "600", "700", "900"],
|
|
variable: "--font-archivo",
|
|
});
|
|
|
|
const spaceGrotesk = Space_Grotesk({
|
|
subsets: ["latin"],
|
|
weight: ["300", "400", "500", "600", "700"],
|
|
variable: "--font-space-grotesk",
|
|
});
|
|
|
|
const ibmPlexMono = IBM_Plex_Mono({
|
|
subsets: ["latin"],
|
|
weight: ["300", "400", "500", "600", "700"],
|
|
variable: "--font-ibm-plex-mono",
|
|
});
|
|
|
|
import { getDictionary } from "@/get-dictionary";
|
|
|
|
export async function generateMetadata({ params }: { params: Promise<{ lang: Locale }> }): Promise<Metadata> {
|
|
const { lang } = await params;
|
|
const dict = await getDictionary(lang);
|
|
|
|
return {
|
|
metadataBase: new URL('https://ayris.tech'),
|
|
title: dict.meta.home.title,
|
|
description: dict.meta.home.desc,
|
|
keywords: ["AI Solutions", "Blockchain Development", "Mobile App", "Web Development", "Digital Transformation"],
|
|
openGraph: {
|
|
title: dict.meta.home.title,
|
|
description: dict.meta.home.desc,
|
|
url: 'https://ayris.tech',
|
|
siteName: 'Ayris Tech',
|
|
images: [
|
|
{
|
|
url: '/og-image.jpg',
|
|
width: 1200,
|
|
height: 630,
|
|
alt: 'Ayris Tech - AI & Blockchain Solutions'
|
|
}
|
|
],
|
|
locale: lang === 'tr' ? 'tr_TR' : 'en_US',
|
|
type: 'website',
|
|
},
|
|
twitter: {
|
|
card: 'summary_large_image',
|
|
title: dict.meta.home.title,
|
|
description: dict.meta.home.desc,
|
|
images: ['/og-image.jpg'],
|
|
},
|
|
alternates: {
|
|
canonical: '/',
|
|
languages: {
|
|
'en': '/en',
|
|
'tr': '/tr',
|
|
},
|
|
},
|
|
};
|
|
}
|
|
|
|
const jsonLd = {
|
|
'@context': 'https://schema.org',
|
|
'@type': 'Organization',
|
|
name: 'Ayris Tech',
|
|
url: 'https://ayris.tech',
|
|
logo: 'https://ayris.tech/logo.png', // Update with actual logo URL if available
|
|
description: 'Ayris Tech delivers enterprise-grade digital transformation using AI, Blockchain, and modern web technologies.',
|
|
address: {
|
|
'@type': 'PostalAddress',
|
|
addressLocality: 'Muğla',
|
|
addressCountry: 'TR'
|
|
}
|
|
};
|
|
|
|
export async function generateStaticParams() {
|
|
return i18n.locales.map((locale) => ({ lang: locale }));
|
|
}
|
|
|
|
export default async function RootLayout({
|
|
children,
|
|
params,
|
|
}: {
|
|
children: React.ReactNode;
|
|
params: Promise<{ lang: string }>;
|
|
}) {
|
|
const { lang } = await params;
|
|
return (
|
|
<html lang={lang} className="scroll-smooth">
|
|
<head>
|
|
<script
|
|
type="application/ld+json"
|
|
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
|
/>
|
|
</head>
|
|
<body className={`${archivo.variable} ${spaceGrotesk.variable} ${ibmPlexMono.variable} font-body bg-[#F4F0E8] text-[#0A0A0A] antialiased`}>
|
|
{children}
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|