feat(config, layout, components): enhance security headers, improve SEO, and update project descriptions
- Added security headers in the Next.js configuration to enhance application security. - Updated metadata in the layout component for improved SEO, including new titles, descriptions, and keywords. - Introduced JSON-LD schema for projects to enhance search engine visibility. - Enhanced project descriptions in the portfolio data for clarity and detail. - Improved header component with logo integration and refined social media links for better accessibility.
This commit is contained in:
1 parent
3f3fca11ab
commit
ad6a76efdd
14 files changed
+467
-57
No files matched your search
+133
-28
@@ -1,4 +1,4 @@
|
||||
import type { Metadata } from "next";
|
||||
import type { Metadata, Viewport } 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
|
||||
@@ -8,27 +8,36 @@ import "./globals.css";
|
||||
const geistSans = Geist({
|
||||
variable: "--font-geist-sans",
|
||||
subsets: ["latin"],
|
||||
display: "swap",
|
||||
adjustFontFallback: true,
|
||||
});
|
||||
|
||||
const geistMono = Geist_Mono({
|
||||
variable: "--font-geist-mono",
|
||||
subsets: ["latin"],
|
||||
display: "swap",
|
||||
adjustFontFallback: true,
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Evandro Fonseca Junior - Desenvolvedor Full-Stack",
|
||||
title: "Evandro Fonseca Junior - Engenheiro Full-Stack | Next.js, React, Tauri Specialist",
|
||||
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.",
|
||||
"Engenheiro Full-Stack especializado em Next.js, React, Angular, Node.js e Tauri. Desenvolvedor de sistemas web escaláveis, aplicações desktop e automação. Experiência em PostgreSQL, MySQL, computação em nuvem e IoT.",
|
||||
keywords: [
|
||||
"desenvolvedor",
|
||||
"full-stack",
|
||||
"angular",
|
||||
"react",
|
||||
"node.js",
|
||||
"typescript",
|
||||
"engenheiro full-stack",
|
||||
"Next.js specialist",
|
||||
"React developer",
|
||||
"Tauri developer",
|
||||
"Angular",
|
||||
"Node.js",
|
||||
"TypeScript",
|
||||
"PostgreSQL",
|
||||
"MySQL",
|
||||
"computação em nuvem",
|
||||
"iot",
|
||||
"energia renovável",
|
||||
"IoT",
|
||||
"automação",
|
||||
"arquitetura de software",
|
||||
"sistemas escaláveis",
|
||||
],
|
||||
authors: [{ name: "Evandro Fonseca Junior" }],
|
||||
creator: "Evandro Fonseca Junior",
|
||||
@@ -38,25 +47,34 @@ export const metadata: Metadata = {
|
||||
address: false,
|
||||
telephone: false,
|
||||
},
|
||||
metadataBase: new URL("https://evandrofonsecajunior.dev"),
|
||||
metadataBase: new URL("https://evandro.dev.br"),
|
||||
alternates: {
|
||||
canonical: "/",
|
||||
},
|
||||
openGraph: {
|
||||
title: "Evandro Fonseca Junior - Desenvolvedor Full-Stack",
|
||||
title: "Evandro Fonseca Junior - Engenheiro Full-Stack | Next.js, React, Tauri Specialist",
|
||||
description:
|
||||
"Desenvolvedor Full-Stack especializado em soluções web modernas com Angular, React, Node.js e computação em nuvem.",
|
||||
url: "https://evandrofonsecajunior.dev",
|
||||
"Engenheiro Full-Stack especializado em Next.js, React, Angular, Node.js e Tauri. Desenvolvedor de sistemas web escaláveis e aplicações desktop.",
|
||||
url: "https://evandro.dev.br",
|
||||
siteName: "Evandro Fonseca Junior",
|
||||
locale: "pt_BR",
|
||||
type: "website",
|
||||
images: [
|
||||
{
|
||||
url: "/opengraph-image",
|
||||
width: 1200,
|
||||
height: 630,
|
||||
alt: "Evandro Fonseca Junior - Engenheiro Full-Stack | Next.js, React, Tauri Specialist",
|
||||
},
|
||||
],
|
||||
},
|
||||
twitter: {
|
||||
card: "summary_large_image",
|
||||
title: "Evandro Fonseca Junior - Desenvolvedor Full-Stack",
|
||||
title: "Evandro Fonseca Junior - Engenheiro Full-Stack | Next.js, React, Tauri Specialist",
|
||||
description:
|
||||
"Desenvolvedor Full-Stack especializado em soluções web modernas com Angular, React, Node.js e computação em nuvem.",
|
||||
"Engenheiro Full-Stack especializado em Next.js, React, Angular, Node.js e Tauri. Desenvolvedor de sistemas web escaláveis e aplicações desktop.",
|
||||
creator: "@evandrodevbr",
|
||||
images: ["/opengraph-image"],
|
||||
},
|
||||
robots: {
|
||||
index: true,
|
||||
@@ -71,12 +89,56 @@ export const metadata: Metadata = {
|
||||
},
|
||||
};
|
||||
|
||||
export const viewport: Viewport = {
|
||||
themeColor: "#000000",
|
||||
width: "device-width",
|
||||
initialScale: 1,
|
||||
maximumScale: 5,
|
||||
};
|
||||
|
||||
// Interface tipada corretamente
|
||||
interface RootLayoutProps {
|
||||
children: ReactNode;
|
||||
}
|
||||
|
||||
export default function RootLayout({ children }: Readonly<RootLayoutProps>) {
|
||||
const jsonLd = {
|
||||
"@context": "https://schema.org",
|
||||
"@type": "ProfilePage",
|
||||
"mainEntity": {
|
||||
"@type": "Person",
|
||||
"name": "Evandro Fonseca Junior",
|
||||
"alternateName": "Evandro.dev",
|
||||
"jobTitle": "Engenheiro de Software Full-Stack",
|
||||
"url": "https://evandro.dev.br",
|
||||
"sameAs": [
|
||||
"https://github.com/evandrodevbr",
|
||||
"https://www.linkedin.com/in/evandro-fonseca-junior-0969aa1b0/",
|
||||
],
|
||||
"knowsAbout": [
|
||||
"Software Engineering",
|
||||
"Next.js",
|
||||
"React",
|
||||
"Angular",
|
||||
"Node.js",
|
||||
"TypeScript",
|
||||
"Tauri",
|
||||
"System Architecture",
|
||||
"Cloud Computing",
|
||||
"IoT",
|
||||
"Automation",
|
||||
"PostgreSQL",
|
||||
"MySQL",
|
||||
],
|
||||
"worksFor": {
|
||||
"@type": "Organization",
|
||||
"name": "Freelancer / Consultor Independente",
|
||||
},
|
||||
"description":
|
||||
"Engenheiro de software especializado em arquitetura web moderna, automação e sistemas de alta performance. Experiência em Next.js, React, Angular, Node.js e desenvolvimento de aplicações desktop com Tauri.",
|
||||
},
|
||||
};
|
||||
|
||||
return (
|
||||
<html lang="pt-BR">
|
||||
<head>
|
||||
@@ -98,16 +160,10 @@ export default function RootLayout({ children }: Readonly<RootLayoutProps>) {
|
||||
<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" />
|
||||
<link rel="canonical" href="https://evandro.dev.br" />
|
||||
|
||||
{/* 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
|
||||
@@ -118,14 +174,14 @@ export default function RootLayout({ children }: Readonly<RootLayoutProps>) {
|
||||
|
||||
{/* 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`}
|
||||
>
|
||||
<script
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
||||
/>
|
||||
{children}
|
||||
<Script
|
||||
src="/analytics/api/script.js"
|
||||
@@ -135,6 +191,55 @@ export default function RootLayout({ children }: Readonly<RootLayoutProps>) {
|
||||
data-replay-block-class="rr-block"
|
||||
data-replay-ignore-class="rr-ignore"
|
||||
strategy="afterInteractive"
|
||||
data-session-replay="true"
|
||||
data-track-errors="true"
|
||||
/>
|
||||
{/* Google Analytics - Interceptor para bypass de adblocker */}
|
||||
<Script
|
||||
id="google-analytics-proxy-interceptor"
|
||||
strategy="beforeInteractive"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `
|
||||
(function() {
|
||||
// Interceptar fetch
|
||||
const originalFetch = window.fetch;
|
||||
window.fetch = function(url, options) {
|
||||
if (typeof url === 'string' && url.includes('google-analytics.com')) {
|
||||
url = url.replace('https://www.google-analytics.com', '/ga');
|
||||
}
|
||||
return originalFetch.call(this, url, options);
|
||||
};
|
||||
|
||||
// Interceptar XMLHttpRequest
|
||||
const originalOpen = XMLHttpRequest.prototype.open;
|
||||
XMLHttpRequest.prototype.open = function(method, url, ...rest) {
|
||||
if (typeof url === 'string' && url.includes('google-analytics.com')) {
|
||||
url = url.replace('https://www.google-analytics.com', '/ga');
|
||||
}
|
||||
return originalOpen.call(this, method, url, ...rest);
|
||||
};
|
||||
})();
|
||||
`,
|
||||
}}
|
||||
/>
|
||||
{/* Google Analytics - Script principal via proxy */}
|
||||
<Script
|
||||
src="/gtm/js/G-QTT9QT0T3S"
|
||||
strategy="afterInteractive"
|
||||
async
|
||||
/>
|
||||
{/* Google Analytics - Inicialização */}
|
||||
<Script
|
||||
id="google-analytics-init"
|
||||
strategy="afterInteractive"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', 'G-QTT9QT0T3S');
|
||||
`,
|
||||
}}
|
||||
/>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in new issue
Block a user