feat: extract hardcoded branding values to env vars
This commit is contained in:
+8
-6
@@ -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é'},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user