From 2232cd736082f4fd4620ee349b2ce43a157dd5ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20FAMIBELLE-PRONZOLA?= Date: Fri, 26 Jun 2026 00:33:50 +0400 Subject: [PATCH 1/9] feat: replace static manifest.json with dynamic app/manifest.js --- app/manifest.js | 25 +++++++++ public/manifest.json | 64 ---------------------- public/{maskable_oki.png => maskable.png} | Bin 3 files changed, 25 insertions(+), 64 deletions(-) create mode 100644 app/manifest.js delete mode 100644 public/manifest.json rename public/{maskable_oki.png => maskable.png} (100%) diff --git a/app/manifest.js b/app/manifest.js new file mode 100644 index 0000000..41cd53f --- /dev/null +++ b/app/manifest.js @@ -0,0 +1,25 @@ +export default function manifest() { + return { + name: process.env.NEXT_PUBLIC_SITE_NAME || 'PAWÒL-NU', + short_name: process.env.NEXT_PUBLIC_SITE_SHORT_NAME || 'PAWÒL-NU', + description: process.env.NEXT_PUBLIC_SITE_DESCRIPTION || 'PAWÒL-NU a pour but de promouvoir le Medukam (ou Wanni Wannan) et les productions afro-diasporiques.', + scope: '/', + start_url: '/', + display: 'standalone', + background_color: '#303030', + theme_color: '#303030', + orientation: 'portrait-primary', + icons: [ + {src: '/logo-72x72.png', type: 'image/png', sizes: '72x72'}, + {src: '/logo-96x96.png', type: 'image/png', sizes: '96x96'}, + {src: '/logo-128x128.png', type: 'image/png', sizes: '128x128'}, + {src: '/logo-144x144.png', type: 'image/png', sizes: '144x144'}, + {src: '/logo-152x152.png', type: 'image/png', sizes: '152x152'}, + {src: '/logo-192x192.png', type: 'image/png', sizes: '192x192'}, + {src: '/logo-256x256.png', type: 'image/png', sizes: '256x256'}, + {src: '/logo-384x384.png', type: 'image/png', sizes: '384x384'}, + {src: '/logo-512x512.png', type: 'image/png', sizes: '512x512'}, + {src: '/maskable.png', type: 'image/png', sizes: '192x192', purpose: 'maskable'}, + ], + } +} diff --git a/public/manifest.json b/public/manifest.json deleted file mode 100644 index b855343..0000000 --- a/public/manifest.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "PAWÒL-NU", - "short_name": "PAWÒL-NU", - "description": "PAWÒL-NU a pour but de promouvoir le Medukam (ou Wanni Wannan) et les productions afro-diasporiques.", - "scope": "/", - "start_url": "/", - "display": "standalone", - "background_color": "#303030", - "theme_color": "#303030", - "orientation": "portrait-primary", - "icons": [ - { - "src": "/logo-72x72.png", - "type": "image/png", - "sizes": "72x72" - }, - { - "src": "/logo-96x96.png", - "type": "image/png", - "sizes": "96x96" - }, - { - "src": "/logo-128x128.png", - "type": "image/png", - "sizes": "128x128" - }, - { - "src": "/logo-144x144.png", - "type": "image/png", - "sizes": "144x144" - }, - { - "src": "/logo-152x152.png", - "type": "image/png", - "sizes": "152x152" - }, - { - "src": "/logo-192x192.png", - "type": "image/png", - "sizes": "192x192" - }, - { - "src": "/logo-256x256.png", - "type": "image/png", - "sizes": "256x256" - }, - { - "src": "/logo-384x384.png", - "type": "image/png", - "sizes": "384x384" - }, - { - "src": "/logo-512x512.png", - "type": "image/png", - "sizes": "512x512" - }, - { - "src": "maskable_oki.png", - "type": "image/png", - "sizes": "192x192", - "purpose": "maskable" - } - ] -} \ No newline at end of file diff --git a/public/maskable_oki.png b/public/maskable.png similarity index 100% rename from public/maskable_oki.png rename to public/maskable.png -- 2.30.2 From f2d03ebec675736ee1da3bcb8f21b9536ab7af0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20FAMIBELLE-PRONZOLA?= Date: Fri, 26 Jun 2026 00:33:54 +0400 Subject: [PATCH 2/9] feat: parse image domains from NEXT_PUBLIC_DOMAINS_IMAGE --- next.config.js | 41 +++++++++++++++++------------------------ 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/next.config.js b/next.config.js index 8332286..dbfcaa9 100644 --- a/next.config.js +++ b/next.config.js @@ -5,6 +5,22 @@ const withPWA = require('next-pwa')({ skipWaiting: true }) +function buildRemotePatterns() { + const raw = process.env.NEXT_PUBLIC_DOMAINS_IMAGE || '' + const patterns = raw.split(' ').filter(Boolean).map(entry => { + const [hostname, port] = entry.split(':') + const isLocal = hostname === 'localhost' || hostname === '127.0.0.1' + const pattern = {protocol: isLocal ? 'http' : 'https', hostname, pathname: '/uploads/**'} + if (port) pattern.port = port + return pattern + }) + if (!raw.includes('localhost')) + patterns.push({protocol: 'http', hostname: 'localhost', port: '1337', pathname: '/uploads/**'}) + if (!raw.includes('127.0.0.1')) + patterns.push({protocol: 'http', hostname: '127.0.0.1', port: '1337', pathname: '/uploads/**'}) + return patterns +} + module.exports = (withPWA({ turbopack: {}, webpack: config => { @@ -16,29 +32,6 @@ module.exports = (withPWA({ return config }, images: { - remotePatterns: [ - { - protocol: 'https', - hostname: 'api.pawol.nu', - pathname: '/uploads/**', - }, - { - protocol: 'https', - hostname: 'pawol.nu', - }, - { - protocol: 'http', - hostname: '127.0.0.1', - port: '1337', - pathname: '/uploads/**', - }, - { - protocol: 'http', - hostname: 'localhost', - port: '1337', - pathname: '/uploads/**', - }, - ] - + remotePatterns: buildRemotePatterns() } })) -- 2.30.2 From 9cbb5e3d2338565c668b51bdecbb03e8d9730660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20FAMIBELLE-PRONZOLA?= Date: Fri, 26 Jun 2026 00:34:04 +0400 Subject: [PATCH 3/9] feat: extract hardcoded branding values to env vars --- app/awtis/[slug]/page.js | 4 +- app/awtis/page.js | 24 ++++---- app/layout.js | 89 +++++++++++++++++------------- app/paroles/[slug]/page.js | 4 +- app/paroles/layout.js | 24 ++++---- app/paroles/page.js | 14 +++-- app/robots.js | 2 +- app/sipote/layout.js | 26 +++++---- components/head-layout.js | 27 +++++---- components/rezo/rezo-dialog.js | 2 +- components/soutyen/presantasyon.js | 2 +- lib/emails/payment-succeeded.js | 11 ++-- 12 files changed, 133 insertions(+), 96 deletions(-) diff --git a/app/awtis/[slug]/page.js b/app/awtis/[slug]/page.js index e07b463..8df33d5 100644 --- a/app/awtis/[slug]/page.js +++ b/app/awtis/[slug]/page.js @@ -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}`, diff --git a/app/awtis/page.js b/app/awtis/page.js index 111822f..be22ea7 100644 --- a/app/awtis/page.js +++ b/app/awtis/page.js @@ -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`, } } } diff --git a/app/layout.js b/app/layout.js index bf7cf4a..34a017d 100644 --- a/app/layout.js +++ b/app/layout.js @@ -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 = ( + <> + + + + {children} + +
+