Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
docimin committed Aug 21, 2024
1 parent e0e01a8 commit 99f5097
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 9 deletions.
34 changes: 34 additions & 0 deletions src/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
@@ -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' })

Expand Down
16 changes: 7 additions & 9 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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),
Expand Down

0 comments on commit 99f5097

Please sign in to comment.