feat: implement SEO enhancements, automatic slug generation, and font optimizations
All checks were successful
Build and Push App / build (push) Successful in 9m12s
All checks were successful
Build and Push App / build (push) Successful in 9m12s
This commit is contained in:
@@ -8,15 +8,32 @@ import CookieBanner from '../components/CookieBanner';
|
||||
import { Metadata } from 'next';
|
||||
import { Toaster } from 'react-hot-toast';
|
||||
import { getSiteSettings } from '../lib/settings';
|
||||
import { Inter, Playfair_Display } from 'next/font/google';
|
||||
import './globals.css';
|
||||
|
||||
const inter = Inter({
|
||||
subsets: ['latin'],
|
||||
variable: '--font-inter',
|
||||
display: 'swap',
|
||||
});
|
||||
|
||||
const playfair = Playfair_Display({
|
||||
subsets: ['latin'],
|
||||
variable: '--font-playfair',
|
||||
display: 'swap',
|
||||
});
|
||||
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
const settings = await getSiteSettings();
|
||||
return {
|
||||
metadataBase: new URL(process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3000'),
|
||||
title: `${settings.siteName} - L'Annuaire 2.0`,
|
||||
description: settings.siteSlogan,
|
||||
description: settings.siteSlogan || "Découvrez les pépites de l'écosystème africain.",
|
||||
alternates: {
|
||||
canonical: '/',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -24,12 +41,11 @@ export default async function RootLayout({ children }: { children: React.ReactNo
|
||||
const settings = await getSiteSettings();
|
||||
|
||||
return (
|
||||
<html lang="fr">
|
||||
<html lang="fr" className={`${inter.variable} ${playfair.variable}`} suppressHydrationWarning>
|
||||
<head>
|
||||
<link rel="icon" type="image/svg+xml" href="https://cdn-icons-png.flaticon.com/512/1022/1022235.png" />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700&display=swap" rel="stylesheet" />
|
||||
<link rel="icon" type="image/png" href="/favicon.png" />
|
||||
</head>
|
||||
<body className="bg-gray-50 text-gray-900 antialiased min-h-screen flex flex-col font-sans">
|
||||
<body className="bg-gray-50 text-gray-900 antialiased min-h-screen flex flex-col font-sans" suppressHydrationWarning>
|
||||
<UserProvider>
|
||||
<Toaster position="top-right" />
|
||||
<AnalyticsTracker />
|
||||
|
||||
Reference in New Issue
Block a user