feat: extract hardcoded branding values to env vars

This commit is contained in:
2026-06-26 00:34:04 +04:00
parent f2d03ebec6
commit 9cbb5e3d23
12 changed files with 133 additions and 96 deletions
+8 -6
View File
@@ -8,6 +8,8 @@ import Footer from '../../components/footer'
const apiUrl = process.env.NEXT_PUBLIC_API_URL_ROOT || 'http://localhost:1337'
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3000'
const siteName = process.env.NEXT_PUBLIC_SITE_NAME || 'PAWÒL-NU. Paroles et traductions.'
const twitterHandle = `@${process.env.NEXT_PUBLIC_TWITTER_USERNAME || 'OrganisationKA'}`
async function jwennDone() {
const denyeTeks = await jwennDenyeTeks()
@@ -29,23 +31,23 @@ export async function generateMetadata() {
const description = `Derniers morceaux : ${songList}`
return {
title: 'PAWÒL-NU | Derniers morceaux',
title: `${siteName} | Derniers morceaux`,
description,
openGraph: {
title: 'PAWÒL-NU | Derniers morceaux',
title: `${siteName} | Derniers morceaux`,
description,
url: `${siteUrl}/paroles`,
siteName: 'PAWÒL-NU. Paroles et traductions.',
siteName,
images: [{url: imageUrl, width: imageWidth, height: imageHeight}],
locale: 'fr_FR',
type: 'website',
},
twitter: {
site: '@OrganisationKA',
site: twitterHandle,
card: 'summary_large_image',
title: 'PAWÒL-NU | Derniers morceaux',
title: `${siteName} | Derniers morceaux`,
description,
creator: '@OrganisationKA',
creator: twitterHandle,
images: {url: imageUrl, alt: 'Couverture du dernier morceau publié'},
},
}