feat: extract hardcoded branding values to env vars
This commit is contained in:
+52
-37
@@ -3,24 +3,33 @@ import TopLoader from '../components/top-loader'
|
||||
import Navigasyon from '../components/navigasyon'
|
||||
import ThemeRegistry from './theme-registy'
|
||||
|
||||
const siteName = process.env.NEXT_PUBLIC_SITE_NAME || 'PAWÒL-NU. Paroles et traductions.'
|
||||
const siteDescription = process.env.NEXT_PUBLIC_SITE_DESCRIPTION || 'PAWÒL-NU a pour but de promouvoir le Medukam (ou Wanni Wannan) et les productions afro-diasporiques.'
|
||||
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://pawol.nu'
|
||||
const orgName = process.env.NEXT_PUBLIC_ORG_NAME || 'OKI'
|
||||
const orgEmail = process.env.NEXT_PUBLIC_ORG_EMAIL || 'kontak@o-k-i.net'
|
||||
const orgLocation = process.env.NEXT_PUBLIC_ORG_LOCATION || 'Guadeloupe'
|
||||
const twitterHandle = `@${process.env.NEXT_PUBLIC_TWITTER_USERNAME || 'OrganisationKA'}`
|
||||
const plausibleUrl = process.env.NEXT_PUBLIC_PLAUSIBLE_URL || null
|
||||
|
||||
export const metadata = {
|
||||
metadataBase: new URL('https://pawol.nu'),
|
||||
manifest: '/manifest.json',
|
||||
title: 'PAWÒL-NU. Paroles et traductions.',
|
||||
description: 'PAWÒL-NU a pour but de promouvoir le Medukam (ou Wanni Wannan) et les productions afro-diasporiques.',
|
||||
author: 'OKI',
|
||||
metadataBase: new URL(siteUrl),
|
||||
manifest: '/manifest.webmanifest',
|
||||
title: siteName,
|
||||
description: siteDescription,
|
||||
author: orgName,
|
||||
category: 'music',
|
||||
creator: 'OKI',
|
||||
publisher: 'OKI',
|
||||
applicationName: 'PAWÒL-NU. Paroles et traductions.',
|
||||
creator: orgName,
|
||||
publisher: orgName,
|
||||
applicationName: siteName,
|
||||
openGraph: {
|
||||
title: 'PAWÒL-NU. Paroles et traductions.',
|
||||
description: 'PAWÒL-NU a pour but de promouvoir le Medukam (ou Wanni Wannan) et les productions afro-diasporiques.',
|
||||
url: 'https://pawol.nu',
|
||||
siteName: 'PAWÒL-NU. Paroles et traductions.',
|
||||
title: siteName,
|
||||
description: siteDescription,
|
||||
url: siteUrl,
|
||||
siteName,
|
||||
images: [
|
||||
{
|
||||
url: 'https://pawol.nu/logo-512x512.png',
|
||||
url: `${siteUrl}/logo-512x512.png`,
|
||||
width: 512,
|
||||
height: 512
|
||||
}
|
||||
@@ -29,14 +38,14 @@ export const metadata = {
|
||||
type: 'website'
|
||||
},
|
||||
twitter: {
|
||||
site: '@OrganisationKA',
|
||||
site: twitterHandle,
|
||||
card: 'summary_large_image',
|
||||
title: 'PAWÒL-NU. Paroles et traductions.',
|
||||
description: 'PAWÒL-NU a pour but de promouvoir le Medukam (ou Wanni Wannan) et les productions afro-diasporiques.',
|
||||
creator: '@OrganisationKA',
|
||||
title: siteName,
|
||||
description: siteDescription,
|
||||
creator: twitterHandle,
|
||||
images: {
|
||||
url: 'https://pawol.nu/logo-512x512.png',
|
||||
alt: 'PAWÒL-NU Logo',
|
||||
url: `${siteUrl}/logo-512x512.png`,
|
||||
alt: `${siteName} Logo`,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -44,30 +53,36 @@ export const metadata = {
|
||||
const jsonLd = {
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'Organization',
|
||||
url: 'https://pawol.nu',
|
||||
email: 'kontak@o-k-i.net',
|
||||
keywords: ['OKI', 'PAWÒL-NU', 'Paroles', 'Pawol', 'Medukam', 'Wanni Wannan'],
|
||||
legalName: 'PAWÒL-NU',
|
||||
location: 'Guadeloupe'
|
||||
url: siteUrl,
|
||||
email: orgEmail,
|
||||
keywords: [orgName, siteName, 'Paroles', 'Pawol'],
|
||||
legalName: siteName,
|
||||
location: orgLocation,
|
||||
}
|
||||
|
||||
export default async function RootLayout({children}) {
|
||||
const inner = (
|
||||
<>
|
||||
<TopLoader color='#ffeb3b' />
|
||||
<ThemeRegistry>
|
||||
<Navigasyon />
|
||||
{children}
|
||||
</ThemeRegistry>
|
||||
<section>
|
||||
<script
|
||||
type='application/ld+json'
|
||||
dangerouslySetInnerHTML={{__html: JSON.stringify(jsonLd)}}
|
||||
/>
|
||||
</section>
|
||||
</>
|
||||
)
|
||||
|
||||
return (
|
||||
<html lang='fr' suppressHydrationWarning>
|
||||
<body>
|
||||
<PlausibleProvider src='https://plausible.io/js/pa-3sQidCSfiSOXQUh-4La0T.js'>
|
||||
<TopLoader color='#ffeb3b' />
|
||||
<ThemeRegistry>
|
||||
<Navigasyon />
|
||||
{children}
|
||||
</ThemeRegistry>
|
||||
<section>
|
||||
<script
|
||||
type='application/ld+json'
|
||||
dangerouslySetInnerHTML={{__html: JSON.stringify(jsonLd)}}
|
||||
/>
|
||||
</section>
|
||||
</PlausibleProvider>
|
||||
{plausibleUrl
|
||||
? <PlausibleProvider src={plausibleUrl}>{inner}</PlausibleProvider>
|
||||
: inner}
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user