feat: extract hardcoded branding values to env vars
This commit is contained in:
@@ -50,11 +50,11 @@ export async function generateMetadata(props) {
|
||||
type: 'website'
|
||||
},
|
||||
twitter: {
|
||||
site: '@OrganisationKA',
|
||||
site: `@${process.env.NEXT_PUBLIC_TWITTER_USERNAME || 'OrganisationKA'}`,
|
||||
card: 'summary_large_image',
|
||||
title,
|
||||
description,
|
||||
creator: '@OrganisationKA',
|
||||
creator: `@${process.env.NEXT_PUBLIC_TWITTER_USERNAME || 'OrganisationKA'}`,
|
||||
images: {
|
||||
url: `${apiUrl}${kuvetiFormat?.url}`,
|
||||
alt: `Photo de ${anAwtis.alias}`,
|
||||
|
||||
+14
-10
@@ -10,17 +10,21 @@ import Pajinasyon from '../../components/awtis/pajinasyon'
|
||||
import {jwennAwtisPajinasyon} from '../../lib/oki-api'
|
||||
import Footer from '../../components/footer'
|
||||
|
||||
const siteName = process.env.NEXT_PUBLIC_SITE_NAME || 'PAWÒL-NU. Paroles et traductions.'
|
||||
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://pawol.nu'
|
||||
const twitterHandle = `@${process.env.NEXT_PUBLIC_TWITTER_USERNAME || 'OrganisationKA'}`
|
||||
|
||||
export const metadata = {
|
||||
title: 'PAWÒL-NU | Artistes',
|
||||
title: `${siteName} | Artistes`,
|
||||
description: 'Liste des artistes ayant une ou plusieurs œuvres présentes sur le site.',
|
||||
openGraph: {
|
||||
title: 'PAWÒL-NU | Artistes',
|
||||
title: `${siteName} | Artistes`,
|
||||
description: 'Liste des artistes ayant une ou plusieurs œuvres présentes sur le site.',
|
||||
url: 'https://pawol.nu/sipote',
|
||||
siteName: 'PAWÒL-NU. Paroles et traductions.',
|
||||
url: `${siteUrl}/awtis`,
|
||||
siteName,
|
||||
images: [
|
||||
{
|
||||
url: 'https://pawol.nu/logo-512x512.png',
|
||||
url: `${siteUrl}/logo-512x512.png`,
|
||||
width: 512,
|
||||
height: 512
|
||||
}
|
||||
@@ -29,14 +33,14 @@ export const metadata = {
|
||||
type: 'website'
|
||||
},
|
||||
twitter: {
|
||||
site: '@OrganisationKA',
|
||||
site: twitterHandle,
|
||||
card: 'summary_large_image',
|
||||
title: 'PAWÒL-NU | Artistes',
|
||||
title: `${siteName} | Artistes`,
|
||||
description: 'Liste des artistes ayant une ou plusieurs œuvres présentes sur le site.',
|
||||
creator: '@OrganisationKA',
|
||||
creator: twitterHandle,
|
||||
images: {
|
||||
url: 'https://pawol.nu/logo-512x512.png',
|
||||
alt: 'OKI Logo',
|
||||
url: `${siteUrl}/logo-512x512.png`,
|
||||
alt: `${siteName} Logo`,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+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>
|
||||
)
|
||||
|
||||
@@ -53,11 +53,11 @@ export async function generateMetadata(props) {
|
||||
type: 'website'
|
||||
},
|
||||
twitter: {
|
||||
site: '@OrganisationKA',
|
||||
site: `@${process.env.NEXT_PUBLIC_TWITTER_USERNAME || 'OrganisationKA'}`,
|
||||
card: 'summary_large_image',
|
||||
title,
|
||||
description,
|
||||
creator: '@OrganisationKA',
|
||||
creator: `@${process.env.NEXT_PUBLIC_TWITTER_USERNAME || 'OrganisationKA'}`,
|
||||
images: {
|
||||
url: `${apiUrl}${kuvetiFormat?.url}`,
|
||||
alt: `Couverture ${title}`,
|
||||
|
||||
+14
-10
@@ -4,17 +4,21 @@ import {jwennTeks} from '../../lib/oki-api'
|
||||
import TeksDrawer from '../../components/teks/teks-drawer'
|
||||
import Loading from './loading'
|
||||
|
||||
const siteName = process.env.NEXT_PUBLIC_SITE_NAME || 'PAWÒL-NU. Paroles et traductions.'
|
||||
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://pawol.nu'
|
||||
const twitterHandle = `@${process.env.NEXT_PUBLIC_TWITTER_USERNAME || 'OrganisationKA'}`
|
||||
|
||||
export const metadata = {
|
||||
title: 'PAWÒL-NU. Paroles et traductions.',
|
||||
title: siteName,
|
||||
description: 'Retrouvez les paroles et les traductions de vos chansons préférées.',
|
||||
openGraph: {
|
||||
title: 'PAWÒL-NU. Paroles et traductions.',
|
||||
title: siteName,
|
||||
description: 'Retrouvez les paroles et les traductions de vos chansons préférées.',
|
||||
url: 'https://pawol.nu/paroles',
|
||||
siteName: 'PAWÒL-NU. Paroles et traductions.',
|
||||
url: `${siteUrl}/paroles`,
|
||||
siteName,
|
||||
images: [
|
||||
{
|
||||
url: 'https://pawol.nu/logo-512x512.png',
|
||||
url: `${siteUrl}/logo-512x512.png`,
|
||||
width: 512,
|
||||
height: 512
|
||||
}
|
||||
@@ -23,14 +27,14 @@ export const metadata = {
|
||||
type: 'website'
|
||||
},
|
||||
twitter: {
|
||||
site: '@OrganisationKA',
|
||||
site: twitterHandle,
|
||||
card: 'summary_large_image',
|
||||
title: 'PAWÒL-NU. Paroles et traductions.',
|
||||
title: siteName,
|
||||
description: 'Retrouvez les paroles et les traductions de vos chansons préférées.',
|
||||
creator: '@OrganisationKA',
|
||||
creator: twitterHandle,
|
||||
images: {
|
||||
url: 'https://pawol.nu/logo-512x512.png',
|
||||
alt: 'OKI Logo',
|
||||
url: `${siteUrl}/logo-512x512.png`,
|
||||
alt: `${siteName} Logo`,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
+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é'},
|
||||
},
|
||||
}
|
||||
|
||||
+1
-1
@@ -15,6 +15,6 @@ export default function robots() {
|
||||
userAgent: '*',
|
||||
allow: '/',
|
||||
},
|
||||
sitemap: 'https://pawol.nu/sitemap.xml',
|
||||
sitemap: `${process.env.NEXT_PUBLIC_SITE_URL || 'https://pawol.nu'}/sitemap.xml`,
|
||||
}
|
||||
}
|
||||
|
||||
+16
-10
@@ -1,14 +1,20 @@
|
||||
const siteName = process.env.NEXT_PUBLIC_SITE_NAME || 'PAWÒL-NU. Paroles et traductions.'
|
||||
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://pawol.nu'
|
||||
const orgFullName = process.env.NEXT_PUBLIC_ORG_FULL_NAME || process.env.NEXT_PUBLIC_ORG_NAME || 'ORGANISATION KA INTERNATIONALE'
|
||||
const twitterHandle = `@${process.env.NEXT_PUBLIC_TWITTER_USERNAME || 'OrganisationKA'}`
|
||||
const sipoteTitle = `${siteName} | Soutenir ${orgFullName} !`
|
||||
|
||||
export const metadata = {
|
||||
title: 'PAWÒL-NU | Soutenir ORGANISATION KA INTERNATIONALE !',
|
||||
title: sipoteTitle,
|
||||
description: 'Vous pouvez nous soutenir via Liberapay ou PayPal',
|
||||
openGraph: {
|
||||
title: 'PAWÒL-NU | Soutenir ORGANISATION KA INTERNATIONALE !',
|
||||
title: sipoteTitle,
|
||||
description: 'Vous pouvez nous soutenir via Liberapay ou PayPal.',
|
||||
url: 'https://pawol.nu/sipote',
|
||||
siteName: 'PAWÒL-NU | Paroles et traductions.',
|
||||
url: `${siteUrl}/sipote`,
|
||||
siteName,
|
||||
images: [
|
||||
{
|
||||
url: 'https://pawol.nu/sipote.png',
|
||||
url: `${siteUrl}/sipote.png`,
|
||||
width: 500,
|
||||
height: 500
|
||||
}
|
||||
@@ -17,14 +23,14 @@ export const metadata = {
|
||||
type: 'website'
|
||||
},
|
||||
twitter: {
|
||||
site: '@OrganisationKA',
|
||||
site: twitterHandle,
|
||||
card: 'summary_large_image',
|
||||
title: 'PAWÒL-NU | Soutenir ORGANISATION KA INTERNATIONALE !',
|
||||
title: sipoteTitle,
|
||||
description: 'Vous pouvez nous soutenir via Liberapay ou PayPal.',
|
||||
creator: '@OrganisationKA',
|
||||
creator: twitterHandle,
|
||||
images: {
|
||||
url: 'https://pawol.nu/sipote.png',
|
||||
alt: 'Sipòte OKI',
|
||||
url: `${siteUrl}/sipote.png`,
|
||||
alt: `Sipòte ${process.env.NEXT_PUBLIC_ORG_NAME || 'OKI'}`,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user