diff --git a/src/app/[locale]/layout.tsx b/src/app/[locale]/layout.tsx index 9bdcef1d..b665fcd4 100644 --- a/src/app/[locale]/layout.tsx +++ b/src/app/[locale]/layout.tsx @@ -1,6 +1,40 @@ import Header from '@/components/header/header-server' import { getTranslations } from 'next-intl/server' +export async function generateMetadata({ params: { locale } }) { + const meta = await getTranslations({ locale, namespace: 'MainMetadata' }) + + return { + title: { + default: meta('title'), + template: `%s - Headpat`, + }, + description: meta('description'), + keywords: [ + 'headpat', + 'community', + 'social', + 'network', + 'furry', + 'fandom', + 'headpawties', + 'gallery', + 'location sharing', + ], + icons: { + icon: '/logos/Headpat_Logo_web_1024x1024_240518-02.png', + }, + openGraph: { + title: meta('title'), + description: meta('description'), + images: '/logos/Headpat_Logo_web_1024x1024_240518-02.png', + locale: locale, + type: 'website', + }, + metadataBase: new URL(process.env.NEXT_PUBLIC_DOMAIN), + } +} + export default async function LocaleLayout({ children, params: { locale } }) { const pageNames = await getTranslations({ locale, namespace: 'PageNames' }) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 231ab3a1..7a9a3eeb 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -4,19 +4,17 @@ import { ThemeProvider } from './providers' import { Toaster } from '@/components/ui/toaster' import { Toaster as SonnerToaster } from '@/components/ui/sonner' import { cn } from '@/lib/utils' -import { getTranslations } from 'next-intl/server' const inter = Inter({ subsets: ['latin'] }) -export async function generateMetadata({ params: { locale } }) { - const meta = await getTranslations({ locale, namespace: 'MainMetadata' }) - +export async function generateMetadata() { return { title: { - default: meta('title'), + default: 'Headpat Community', template: `%s - Headpat`, }, - description: meta('description'), + description: + 'The Headpat Community is an online social media community. We voluntarily offer our members a platform for connecting, exchanging and expressing.', keywords: [ 'headpat', 'community', @@ -32,10 +30,10 @@ export async function generateMetadata({ params: { locale } }) { icon: '/logos/Headpat_Logo_web_1024x1024_240518-02.png', }, openGraph: { - title: meta('title'), - description: meta('description'), + title: 'Headpat Community', + description: + 'The Headpat Community is an online social media community. We voluntarily offer our members a platform for connecting, exchanging and expressing.', images: '/logos/Headpat_Logo_web_1024x1024_240518-02.png', - locale: locale, type: 'website', }, metadataBase: new URL(process.env.NEXT_PUBLIC_DOMAIN),