140 lines
4.8 KiB
TypeScript
140 lines
4.8 KiB
TypeScript
import type { Metadata } from "next";
|
|
import { Plus_Jakarta_Sans, JetBrains_Mono } from "next/font/google";
|
|
import { NextIntlClientProvider } from 'next-intl';
|
|
import { getMessages, setRequestLocale } from 'next-intl/server';
|
|
import { notFound } from 'next/navigation';
|
|
import { routing } from '@/i18n/routing';
|
|
import { Navbar } from '@/components/Navbar';
|
|
import { Footer } from '@/components/Footer';
|
|
import "../globals.css";
|
|
|
|
const jakartaSans = Plus_Jakarta_Sans({
|
|
variable: "--font-sans",
|
|
subsets: ["latin"],
|
|
weight: ["300", "400", "500", "600", "700", "800"],
|
|
});
|
|
|
|
const jetbrainsMono = JetBrains_Mono({
|
|
variable: "--font-mono",
|
|
subsets: ["latin"],
|
|
weight: ["400", "500", "600", "700"],
|
|
});
|
|
|
|
const BASE_URL = 'https://ayrisai.xyz';
|
|
|
|
export const metadata: Metadata = {
|
|
metadataBase: new URL(BASE_URL),
|
|
title: {
|
|
default: 'ayris.tech YouTube | Code & Resource Portal',
|
|
template: '%s | ayris.tech YouTube',
|
|
},
|
|
description:
|
|
'Official resource portal for the ayris.tech YouTube channel. Browse source code, lesson notes, cheatsheets, AI prompts, and project downloads for every tutorial.',
|
|
keywords: [
|
|
'Next.js', 'React', 'TypeScript', 'Tailwind CSS', 'Python',
|
|
'YouTube tutorial', 'source code', 'ayris.tech', 'web development',
|
|
'AI agents', 'Prisma', 'Docker', 'full-stack',
|
|
],
|
|
authors: [{ name: 'ayris.tech', url: BASE_URL }],
|
|
creator: 'ayris.tech',
|
|
openGraph: {
|
|
type: 'website',
|
|
locale: 'en_US',
|
|
url: BASE_URL,
|
|
siteName: 'ayris.tech YouTube Portal',
|
|
title: 'ayris.tech YouTube | Code & Resource Portal',
|
|
description:
|
|
'Source code, lesson notes, cheatsheets, and project downloads for every ayris.tech YouTube tutorial.',
|
|
images: [{ url: `${BASE_URL}/logo.jpeg`, width: 400, height: 400, alt: 'ayris.tech Logo' }],
|
|
},
|
|
twitter: {
|
|
card: 'summary_large_image',
|
|
title: 'ayris.tech YouTube | Code & Resource Portal',
|
|
description: 'Source code, cheatsheets, AI prompts and downloads for every ayris.tech tutorial.',
|
|
images: [`${BASE_URL}/logo.jpeg`],
|
|
},
|
|
robots: {
|
|
index: true,
|
|
follow: true,
|
|
googleBot: { index: true, follow: true },
|
|
},
|
|
alternates: {
|
|
canonical: BASE_URL,
|
|
},
|
|
};
|
|
|
|
export function generateStaticParams() {
|
|
return routing.locales.map((locale) => ({ locale }));
|
|
}
|
|
|
|
export default async function RootLayout({
|
|
children,
|
|
params
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
params: Promise<{ locale: string }>;
|
|
}>) {
|
|
const { locale } = await params;
|
|
|
|
if (!routing.locales.includes(locale as any)) {
|
|
notFound();
|
|
}
|
|
|
|
setRequestLocale(locale);
|
|
const messages = await getMessages();
|
|
|
|
return (
|
|
<html
|
|
lang={locale}
|
|
className={`${jakartaSans.variable} ${jetbrainsMono.variable} dark h-full antialiased`}
|
|
>
|
|
<body className="min-h-full flex flex-col bg-slate-950 text-slate-100 font-sans selection:bg-red-500 selection:text-white tracking-normal leading-relaxed" suppressHydrationWarning>
|
|
{/* Organization + WebSite JSON-LD — global entity recognition */}
|
|
<script
|
|
type="application/ld+json"
|
|
suppressHydrationWarning
|
|
dangerouslySetInnerHTML={{
|
|
__html: JSON.stringify([
|
|
{
|
|
'@context': 'https://schema.org',
|
|
'@type': 'Organization',
|
|
name: 'ayris.tech',
|
|
url: BASE_URL,
|
|
logo: `${BASE_URL}/logo.jpeg`,
|
|
sameAs: [
|
|
'https://www.youtube.com/@ayristech',
|
|
'https://github.com/ayrisdev',
|
|
'https://git.ayris.tech/ayrisdev',
|
|
],
|
|
description:
|
|
'ayris.tech is a YouTube channel and resource portal publishing tutorials on Next.js, React, TypeScript, Python, AI agents, Docker, and modern full-stack development.',
|
|
},
|
|
{
|
|
'@context': 'https://schema.org',
|
|
'@type': 'WebSite',
|
|
name: 'ayris.tech YouTube Portal',
|
|
url: BASE_URL,
|
|
description:
|
|
'Source code, lesson notes, cheatsheets, AI prompts, and project downloads for every ayris.tech YouTube tutorial.',
|
|
publisher: { '@type': 'Organization', name: 'ayris.tech', url: BASE_URL },
|
|
potentialAction: {
|
|
'@type': 'SearchAction',
|
|
target: { '@type': 'EntryPoint', urlTemplate: `${BASE_URL}/en/lessons?q={search_term_string}` },
|
|
'query-input': 'required name=search_term_string',
|
|
},
|
|
},
|
|
]),
|
|
}}
|
|
/>
|
|
<NextIntlClientProvider messages={messages}>
|
|
<Navbar locale={locale} />
|
|
<main className="flex-1 flex flex-col">
|
|
{children}
|
|
</main>
|
|
<Footer locale={locale} />
|
|
</NextIntlClientProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|