66 lines
1.9 KiB
TypeScript
66 lines
1.9 KiB
TypeScript
import type { Metadata } from "next";
|
|
import { Manrope } from "next/font/google";
|
|
import "./globals.css";
|
|
import { Navbar } from "@/components/layout/Navbar";
|
|
import { Footer } from "@/components/layout/Footer";
|
|
import { LanguageProvider } from "@/context/LanguageContext";
|
|
|
|
const manrope = Manrope({ subsets: ["latin"] });
|
|
|
|
export const metadata: Metadata = {
|
|
// 1. URL Base: Necesario para que Next.js construya rutas absolutas para las imágenes OG
|
|
metadataBase: new URL("https://itemopina.app.gestions.es/"),
|
|
|
|
// 2. Título dinámico
|
|
title: {
|
|
default: "ITEM OPINA | Inteligencia de Mercado",
|
|
template: "%s | ITEM OPINA", // "%s" se reemplaza por el título de las subpáginas
|
|
},
|
|
description: "Estudios de mercado y consultoría con rigor metodológico.",
|
|
|
|
// 3. OpenGraph Automático
|
|
openGraph: {
|
|
title: "ITEM OPINA | Inteligencia de Mercado",
|
|
description: "Estudios de mercado y consultoría con rigor metodológico.",
|
|
url: "https://itemopina.app.gestions.es/",
|
|
siteName: "ITEM OPINA",
|
|
images: [
|
|
{
|
|
url: "/og-image.jpg", // Next.js buscará esto en la carpeta /public
|
|
width: 1200,
|
|
height: 630,
|
|
alt: "ITEM OPINA Portada",
|
|
},
|
|
],
|
|
locale: "es_ES",
|
|
type: "website",
|
|
},
|
|
|
|
// 4. Tarjetas de Twitter (X) automáticas
|
|
twitter: {
|
|
card: "summary_large_image",
|
|
title: "ITEM OPINA | Inteligencia de Mercado",
|
|
description: "Estudios de mercado y consultoría con rigor metodológico.",
|
|
images: ["/og-image.jpg"],
|
|
},
|
|
};
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
return (
|
|
<html lang="es">
|
|
<body className={`${manrope.className} antialiased flex flex-col min-h-screen`}>
|
|
<LanguageProvider>
|
|
<Navbar />
|
|
<main className="flex-grow">
|
|
{children}
|
|
</main>
|
|
<Footer />
|
|
</LanguageProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
} |