Skip to content

Commit

Permalink
new metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
docimin committed Aug 21, 2024
1 parent a0ad9ba commit e0e01a8
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
4 changes: 4 additions & 0 deletions messages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
"frontpage": "Profil",
"socials": "Soziale Netzwerke"
},
"MainMetadata": {
"title": "Headpat Community",
"description": "Die Headpat Community ist eine Online-Community für soziale Medien. Wir bieten unseren Mitgliedern freiwillig eine Plattform zum Verbinden, Austauschen und Ausdrücken an."
},
"AccountMetadata": {
"title": "Konto",
"description": "Auf der Kontoseite können Sie Ihre Kontoeinstellungen verwalten."
Expand Down
4 changes: 4 additions & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
"frontpage": "Profile",
"socials": "Socials"
},
"MainMetadata": {
"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."
},
"AccountMetadata": {
"title": "Account",
"description": "The account page is where you can manage your account settings."
Expand Down
4 changes: 4 additions & 0 deletions messages/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
"frontpage": "Profiel",
"socials": "Socials"
},
"MainMetadata": {
"title": "Headpat Community",
"description": "De Headpat Community is een online gemeenschap voor sociale media. We bieden onze leden vrijwillig een platform om te verbinden, uit te wisselen en zich uit te drukken."
},
"AccountMetadata": {
"title": "Account",
"description": "Op de accountpagina kun je je accountinstellingen beheren."
Expand Down
17 changes: 11 additions & 6 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@ 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() {
export async function generateMetadata({ params: { locale } }) {
const meta = await getTranslations({ locale, namespace: 'MainMetadata' })

return {
title: {
default: 'Headpat Community',
default: meta('title'),
template: `%s - Headpat`,
},
description: 'Social network for headpawties',
description: meta('description'),
keywords: [
'headpat',
'community',
Expand All @@ -22,15 +25,17 @@ export async function generateMetadata() {
'furry',
'fandom',
'headpawties',
'gallery',
'location sharing',
],
icons: {
icon: '/logos/Headpat_Logo_web_1024x1024_240518-02.png',
},
openGraph: {
title: 'Headpat Community',
description: 'Social network for headpawties',
siteName: 'Headpat',
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),
Expand Down

0 comments on commit e0e01a8

Please sign in to comment.