- Implemented a rewrite rule in the Next.js configuration to proxy analytics requests, bypassing adblockers for Rybbit Analytics. - Enhanced the RootLayout component by correcting the typing of the children prop and improving the structure for better type safety.
139 lines
4.3 KiB
TypeScript
139 lines
4.3 KiB
TypeScript
import type { Metadata } from "next";
|
|
import { Geist, Geist_Mono } from "next/font/google";
|
|
import Script from "next/script";
|
|
// Importação necessária para corrigir o erro de namespace e tipagem do children
|
|
import { ReactNode } from "react";
|
|
import "./globals.css";
|
|
|
|
const geistSans = Geist({
|
|
variable: "--font-geist-sans",
|
|
subsets: ["latin"],
|
|
});
|
|
|
|
const geistMono = Geist_Mono({
|
|
variable: "--font-geist-mono",
|
|
subsets: ["latin"],
|
|
});
|
|
|
|
export const metadata: Metadata = {
|
|
title: "Evandro Fonseca Junior - Desenvolvedor Full-Stack",
|
|
description:
|
|
"Desenvolvedor Full-Stack especializado em soluções web modernas com Angular, React, Node.js e computação em nuvem. Experiência em energia renovável e IoT.",
|
|
keywords: [
|
|
"desenvolvedor",
|
|
"full-stack",
|
|
"angular",
|
|
"react",
|
|
"node.js",
|
|
"typescript",
|
|
"computação em nuvem",
|
|
"iot",
|
|
"energia renovável",
|
|
],
|
|
authors: [{ name: "Evandro Fonseca Junior" }],
|
|
creator: "Evandro Fonseca Junior",
|
|
publisher: "Evandro Fonseca Junior",
|
|
formatDetection: {
|
|
email: false,
|
|
address: false,
|
|
telephone: false,
|
|
},
|
|
metadataBase: new URL("https://evandrofonsecajunior.dev"),
|
|
alternates: {
|
|
canonical: "/",
|
|
},
|
|
openGraph: {
|
|
title: "Evandro Fonseca Junior - Desenvolvedor Full-Stack",
|
|
description:
|
|
"Desenvolvedor Full-Stack especializado em soluções web modernas com Angular, React, Node.js e computação em nuvem.",
|
|
url: "https://evandrofonsecajunior.dev",
|
|
siteName: "Evandro Fonseca Junior",
|
|
locale: "pt_BR",
|
|
type: "website",
|
|
},
|
|
twitter: {
|
|
card: "summary_large_image",
|
|
title: "Evandro Fonseca Junior - Desenvolvedor Full-Stack",
|
|
description:
|
|
"Desenvolvedor Full-Stack especializado em soluções web modernas com Angular, React, Node.js e computação em nuvem.",
|
|
creator: "@evandrodevbr",
|
|
},
|
|
robots: {
|
|
index: true,
|
|
follow: true,
|
|
googleBot: {
|
|
index: true,
|
|
follow: true,
|
|
"max-video-preview": -1,
|
|
"max-image-preview": "large",
|
|
"max-snippet": -1,
|
|
},
|
|
},
|
|
};
|
|
|
|
// Interface tipada corretamente
|
|
interface RootLayoutProps {
|
|
children: ReactNode;
|
|
}
|
|
|
|
export default function RootLayout({ children }: Readonly<RootLayoutProps>) {
|
|
return (
|
|
<html lang="pt-BR">
|
|
<head>
|
|
{/* Preconnect to external origins for better performance */}
|
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
<link
|
|
rel="preconnect"
|
|
href="https://fonts.gstatic.com"
|
|
crossOrigin="anonymous"
|
|
/>
|
|
<link rel="preconnect" href="https://wa.me" />
|
|
<link rel="preconnect" href="https://www.linkedin.com" />
|
|
<link rel="preconnect" href="https://github.com" />
|
|
|
|
{/* DNS prefetch for additional performance */}
|
|
<link rel="dns-prefetch" href="//fonts.googleapis.com" />
|
|
<link rel="dns-prefetch" href="//fonts.gstatic.com" />
|
|
<link rel="dns-prefetch" href="//wa.me" />
|
|
<link rel="dns-prefetch" href="//www.linkedin.com" />
|
|
<link rel="dns-prefetch" href="//github.com" />
|
|
|
|
{/* Favicon and icons */}
|
|
<link rel="icon" href="/favicon.ico" sizes="any" />
|
|
<link rel="apple-touch-icon" href="/favicon.ico" />
|
|
<link rel="manifest" href="/manifest.json" />
|
|
|
|
{/* SEO and Crawling */}
|
|
<link rel="canonical" href="https://evandrofonsecajunior.dev" />
|
|
|
|
{/* Theme color for mobile browsers */}
|
|
<meta name="theme-color" content="#000000" />
|
|
<meta name="msapplication-TileColor" content="#000000" />
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
<meta
|
|
name="apple-mobile-web-app-status-bar-style"
|
|
content="black-translucent"
|
|
/>
|
|
<meta name="apple-mobile-web-app-title" content="Evandro.dev" />
|
|
|
|
{/* Performance hints */}
|
|
<link rel="preload" href="/edev.jpeg" as="image" />
|
|
<meta
|
|
name="viewport"
|
|
content="width=device-width, initial-scale=1, maximum-scale=5"
|
|
/>
|
|
</head>
|
|
<body
|
|
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
|
>
|
|
{children}
|
|
<Script
|
|
src="/analytics/api/script.js"
|
|
data-site-id="1"
|
|
data-debounce="100"
|
|
strategy="afterInteractive"
|
|
/>
|
|
</body>
|
|
</html>
|
|
);
|
|
} |