diff --git a/src/app/articles/layout.tsx b/src/app/articles/layout.tsx
index 1748b40..ef1b6f5 100644
--- a/src/app/articles/layout.tsx
+++ b/src/app/articles/layout.tsx
@@ -3,14 +3,14 @@ import type { ReactNode } from 'react';
export const metadata: Metadata = {
title: 'Artigos',
- description: 'Artigos e tutoriais sobre desenvolvimento de software, arquitetura, boas práticas e tecnologia. Aprenda com conteúdo técnico de qualidade.',
+ description: 'Seleção de publicações técnicas de Guilherme Biff Zarelli hospedadas no Medium, PicPay e LuizaLabs, com links para as fontes originais.',
keywords: ['artigos', 'tutoriais', 'desenvolvimento', 'software', 'programação', 'tecnologia', 'arquitetura', 'boas práticas', 'java', 'javascript', 'typescript', 'aprendizado'],
authors: [{ name: 'Guilherme Biff Zarelli' }],
alternates: { canonical: '/articles' },
openGraph: {
url: '/articles',
title: 'Artigos | HelpDev',
- description: 'Artigos e tutoriais sobre desenvolvimento de software, arquitetura, boas práticas e tecnologia. Aprenda com conteúdo técnico de qualidade.',
+ description: 'Publicações técnicas de Guilherme Biff Zarelli em canais externos, com links para as páginas e autoria originais.',
type: 'website',
images: [{
url: 'https://helpdev.com.br/images/logo.png',
@@ -22,7 +22,7 @@ export const metadata: Metadata = {
twitter: {
card: 'summary_large_image',
title: 'Artigos | HelpDev',
- description: 'Artigos e tutoriais sobre desenvolvimento de software, arquitetura, boas práticas e tecnologia.',
+ description: 'Publicações técnicas de Guilherme Biff Zarelli em canais externos, com links para as páginas e autoria originais.',
images: ['https://helpdev.com.br/images/logo.png'],
creator: '@gbzarelli',
site: '@_helpdev',
diff --git a/src/app/articles/page.tsx b/src/app/articles/page.tsx
index 235494a..217d449 100644
--- a/src/app/articles/page.tsx
+++ b/src/app/articles/page.tsx
@@ -123,7 +123,7 @@ export default function Articles() {
Artigos
- Compartilhando conhecimento sobre desenvolvimento de software
+ Seleção de publicações técnicas assinadas por Guilherme Biff Zarelli em canais como Medium, PicPay e LuizaLabs. O conteúdo completo e sua autoria permanecem nas páginas de origem.
diff --git a/src/app/blog/[slug]/page.tsx b/src/app/blog/[slug]/page.tsx
new file mode 100644
index 0000000..6c19efe
--- /dev/null
+++ b/src/app/blog/[slug]/page.tsx
@@ -0,0 +1,130 @@
+import type { Metadata } from 'next';
+import Link from 'next/link';
+import { notFound } from 'next/navigation';
+import AdSenseBanner from '@/app/components/AdSenseBanner';
+import { editorialArticles } from '@/data/editorialArticles';
+
+interface BlogArticlePageProps {
+ params: Promise<{ slug: string }>;
+}
+
+export function generateStaticParams() {
+ return editorialArticles.map(({ slug }) => ({ slug }));
+}
+
+export async function generateMetadata({ params }: BlogArticlePageProps): Promise
{
+ const { slug } = await params;
+ const article = editorialArticles.find((entry) => entry.slug === slug);
+ if (!article) return {};
+
+ const canonical = `/blog/${article.slug}`;
+ return {
+ title: article.title,
+ description: article.description,
+ authors: [{ name: 'HelpDev' }],
+ alternates: { canonical },
+ openGraph: {
+ type: 'article',
+ url: canonical,
+ title: article.title,
+ description: article.description,
+ publishedTime: `${article.updatedAt}T12:00:00Z`,
+ modifiedTime: `${article.updatedAt}T12:00:00Z`,
+ },
+ };
+}
+
+export default async function BlogArticlePage({ params }: BlogArticlePageProps) {
+ const { slug } = await params;
+ const article = editorialArticles.find((entry) => entry.slug === slug);
+ if (!article) notFound();
+
+ const articleUrl = `https://helpdev.com.br/blog/${article.slug}`;
+ const structuredData = {
+ '@context': 'https://schema.org',
+ '@type': 'TechArticle',
+ headline: article.title,
+ description: article.description,
+ dateModified: article.updatedAt,
+ mainEntityOfPage: articleUrl,
+ author: { '@type': 'Organization', name: 'HelpDev', url: 'https://helpdev.com.br' },
+ publisher: { '@type': 'Organization', name: 'HelpDev', url: 'https://helpdev.com.br' },
+ };
+
+ return (
+
+
+
+ Início
+ /
+ Notas técnicas
+ /
+ {article.title}
+
+
+
+ {article.topic}
+ {article.title}
+ {article.description}
+
+ Leitura técnica da HelpDev · Atualizada em{' '}
+ {new Intl.DateTimeFormat('pt-BR', { dateStyle: 'long', timeZone: 'UTC' }).format(new Date(`${article.updatedAt}T12:00:00Z`))}
+
+
+
+
+ {article.sections.map((section) => (
+
+ {section.heading}
+ {section.paragraphs.map((paragraph) => {paragraph}
)}
+ {section.bullets && (
+
+ {section.bullets.map((bullet) => {bullet} )}
+
+ )}
+ {section.code && (
+
+ {section.code}
+
+ )}
+ {section.callout && (
+
+ )}
+
+ ))}
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/src/app/blog/layout.tsx b/src/app/blog/layout.tsx
index a6c2844..ef42c70 100644
--- a/src/app/blog/layout.tsx
+++ b/src/app/blog/layout.tsx
@@ -2,15 +2,15 @@ import type { Metadata } from 'next';
import type { ReactNode } from 'react';
export const metadata: Metadata = {
- title: 'Blog',
- description: 'Blog e gists sobre desenvolvimento de software, arquitetura, boas práticas e tecnologia. Aprenda com conteúdo técnico de qualidade.',
+ title: 'Notas técnicas',
+ description: 'Análises práticas de código, arquitetura e decisões de engenharia baseadas em projetos e exemplos mantidos pela HelpDev.',
keywords: ['artigos', 'tutoriais', 'desenvolvimento', 'software', 'programação', 'tecnologia', 'arquitetura', 'boas práticas', 'java', 'javascript', 'typescript', 'aprendizado'],
authors: [{ name: 'Guilherme Biff Zarelli' }],
alternates: { canonical: '/blog' },
openGraph: {
url: '/blog',
- title: 'Blog | HelpDev',
- description: 'Blog e gists sobre desenvolvimento de software, arquitetura, boas práticas e tecnologia. Aprenda com conteúdo técnico de qualidade.',
+ title: 'Notas técnicas | HelpDev',
+ description: 'Análises práticas de código, arquitetura e decisões de engenharia baseadas em projetos e exemplos mantidos pela HelpDev.',
type: 'website',
images: [{
url: 'https://helpdev.com.br/images/logo.png',
@@ -21,8 +21,8 @@ export const metadata: Metadata = {
},
twitter: {
card: 'summary_large_image',
- title: 'Blog | HelpDev',
- description: 'Blog e gists sobre desenvolvimento de software, arquitetura, boas práticas e tecnologia.',
+ title: 'Notas técnicas | HelpDev',
+ description: 'Análises práticas de código, arquitetura e decisões de engenharia baseadas em projetos e exemplos mantidos pela HelpDev.',
images: ['https://helpdev.com.br/images/logo.png'],
creator: '@gbzarelli',
site: '@_helpdev',
diff --git a/src/app/blog/page.tsx b/src/app/blog/page.tsx
index f1c9d9b..77bd106 100644
--- a/src/app/blog/page.tsx
+++ b/src/app/blog/page.tsx
@@ -1,273 +1,85 @@
'use client';
-import { BlogCard } from '../components/BlogCard';
+import Link from 'next/link';
+import { useMemo, useState } from 'react';
import { Navbar } from '../components/Navbar';
import { SearchBar } from '../components/SearchBar';
-import { useEffect, useState, useMemo, useCallback } from 'react';
-
-interface Gist {
- id: string;
- description: string;
- created_at: string;
- html_url: string;
- files: {
- [key: string]: {
- filename: string;
- language: string;
- raw_url: string;
- content?: string;
- }
- }
- cleanTitle: string;
- cleanDescription: string;
- imageUrl: string;
- tags: string[];
-}
-
-const technologyKeywords = [
- 'aws', 'sns', 'sqs', 's3', 'lambda', 'architecture', 'arquitetura', 'clean', 'design', 'adr',
- 'java', 'spring', 'jvm', 'performance', 'rabbitmq', 'kafka', 'message', 'mensageria',
- 'go', 'golang', 'cloud', 'docker', 'kubernetes', 'test', 'teste', 'quality', 'qualidade',
- 'code', 'código', 'desenvolvimento', 'api', 'rest', 'graphql', 'security', 'segurança',
- 'typescript', 'javascript', 'python', 'php', 'ruby', 'csharp', 'c++', 'c', 'dart', 'rust', 'scala', 'elixir',
- 'backstage', 'mysql', 'mongodb', 'mongo', 'postgres', 'postgresql', 'android', 'sql'
-];
-
-
-// Mapeamento de palavras-chave para imagens temáticas
-const getImageForTitle = (title: string): string => {
- const titleLower = title.toLowerCase();
-
- const imageMap: { [key: string]: string } = {
- // AWS e Serviços
- 'aws': 'https://images.unsplash.com/photo-1550751827-4bd374c3f58b?q=80&w=1000',
- 'sns': 'https://images.unsplash.com/photo-1550751827-4bd374c3f58b?q=80&w=1000',
- 'sqs': 'https://images.unsplash.com/photo-1550751827-4bd374c3f58b?q=80&w=1000',
- 's3': 'https://images.unsplash.com/photo-1550751827-4bd374c3f58b?q=80&w=1000',
- 'lambda': 'https://images.unsplash.com/photo-1550751827-4bd374c3f58b?q=80&w=1000',
-
- // Arquitetura e Design
- 'architecture': 'https://images.unsplash.com/photo-1518432031352-d6fc5c10da5a?q=80&w=1000',
- 'arquitetura': 'https://images.unsplash.com/photo-1518432031352-d6fc5c10da5a?q=80&w=1000',
- 'clean': 'https://images.unsplash.com/photo-1518432031352-d6fc5c10da5a?q=80&w=1000',
- 'design': 'https://images.unsplash.com/photo-1518432031352-d6fc5c10da5a?q=80&w=1000',
- 'adr': 'https://images.unsplash.com/photo-1518432031352-d6fc5c10da5a?q=80&w=1000',
-
- // Java e Performance
- 'java': 'https://images.unsplash.com/photo-1517694712202-14dd9538aa97?q=80&w=1000',
- 'spring': 'https://images.unsplash.com/photo-1517694712202-14dd9538aa97?q=80&w=1000',
- 'jvm': 'https://images.unsplash.com/photo-1517694712202-14dd9538aa97?q=80&w=1000',
- 'performance': 'https://images.unsplash.com/photo-1551288049-bebda4e38f71?q=80&w=1000',
-
- // Mensageria
- 'rabbitmq': 'https://images.unsplash.com/photo-1603695762547-fba8b88ac8ad?q=80&w=1000',
- 'kafka': 'https://images.unsplash.com/photo-1603695762547-fba8b88ac8ad?q=80&w=1000',
- 'message': 'https://images.unsplash.com/photo-1603695762547-fba8b88ac8ad?q=80&w=1000',
- 'mensageria': 'https://images.unsplash.com/photo-1603695762547-fba8b88ac8ad?q=80&w=1000',
-
- // Go
- 'go': 'https://images.unsplash.com/photo-1542831371-29b0f74f9713?q=80&w=1000',
- 'golang': 'https://images.unsplash.com/photo-1542831371-29b0f74f9713?q=80&w=1000',
-
- // Cloud e Infraestrutura
- 'cloud': 'https://images.unsplash.com/photo-1603695762547-fba8b88ac8ad?q=80&w=1000',
- 'docker': 'https://images.unsplash.com/photo-1605745341112-85968b19335b?q=80&w=1000',
- 'kubernetes': 'https://images.unsplash.com/photo-1667372393119-3d4c48d07fc9?q=80&w=1000',
-
- // Testes e Qualidade
- 'test': 'https://images.unsplash.com/photo-1516116216624-53e697fedbea?q=80&w=1000',
- 'teste': 'https://images.unsplash.com/photo-1516116216624-53e697fedbea?q=80&w=1000',
- 'quality': 'https://images.unsplash.com/photo-1516116216624-53e697fedbea?q=80&w=1000',
- 'qualidade': 'https://images.unsplash.com/photo-1516116216624-53e697fedbea?q=80&w=1000',
-
- // Desenvolvimento e Código
- 'code': 'https://images.unsplash.com/photo-1542831371-29b0f74f9713?q=80&w=1000',
- 'código': 'https://images.unsplash.com/photo-1542831371-29b0f74f9713?q=80&w=1000',
- 'desenvolvimento': 'https://images.unsplash.com/photo-1542831371-29b0f74f9713?q=80&w=1000',
-
- // APIs e Integração
- 'api': 'https://images.unsplash.com/photo-1516259762381-22954d7d3ad2?q=80&w=1000',
- 'rest': 'https://images.unsplash.com/photo-1516259762381-22954d7d3ad2?q=80&w=1000',
- 'graphql': 'https://images.unsplash.com/photo-1516259762381-22954d7d3ad2?q=80&w=1000',
-
- // Segurança
- 'security': 'https://images.unsplash.com/photo-1555949963-ff9fe0c870eb?q=80&w=1000',
- 'segurança': 'https://images.unsplash.com/photo-1555949963-ff9fe0c870eb?q=80&w=1000',
-
- // Imagem padrão para outros casos
- 'default': 'https://images.unsplash.com/photo-1542831371-29b0f74f9713?q=80&w=1000'
- };
-
- // Procura por palavras-chave no título
- for (const [keyword, imageUrl] of Object.entries(imageMap)) {
- if (titleLower.includes(keyword)) {
- return imageUrl;
- }
- }
-
- // Retorna a imagem padrão se nenhuma palavra-chave for encontrada
- return imageMap.default;
-};
-
-const extractTagsFromText = (text: string): string[] => {
- const words = text.toLowerCase().match(/\b\w+\b/g) || [];
- const wordSet = new Set(words);
- return technologyKeywords.filter(keyword => wordSet.has(keyword));
-};
+import { editorialArticles } from '@/data/editorialArticles';
export default function Blog() {
- const [gists, setGists] = useState([]);
- const [loading, setLoading] = useState(true);
- const [error, setError] = useState(null);
const [searchTerm, setSearchTerm] = useState('');
-
- const fetchGists = async (pageNumber: number): Promise<{ gists: Gist[], hasMore: boolean }> => {
- try {
- const response = await fetch(`https://api.github.com/users/gbzarelli/gists?page=${pageNumber}&per_page=30`);
- if (!response.ok) {
- throw new Error('Falha ao carregar os gists');
- }
-
- const data = await response.json();
-
- // Filtra e processa os gists
- const helpdevGists = data
- .filter((gist: Gist) => gist.description?.includes('#helpdev-blog'))
- .map((gist: Gist) => {
- const rawTitle = gist.description?.replace('#helpdev-blog', '').trim() || 'Sem título';
- const firstFile = Object.values(gist.files)[0];
- const language = firstFile?.language || 'default';
- const fileName = firstFile?.filename.split('.')[0].replace(/-/g, ' ');
- const description = `${fileName} - ${language}`;
- const tags = extractTagsFromText(gist.description);
-
- return {
- ...gist,
- cleanTitle: rawTitle,
- cleanDescription: description,
- imageUrl: getImageForTitle(rawTitle),
- tags: tags
- };
- });
-
- // Se a página retornou menos que 30 gists, é a última página
- const hasMore = data.length === 30;
-
- return { gists: helpdevGists, hasMore };
- } catch (err) {
- throw new Error(err instanceof Error ? err.message : 'Erro ao carregar os gists');
- }
- };
-
- const loadAllGists = useCallback(async () => {
- try {
- let currentPage = 1;
- let hasMore = true;
-
- while (hasMore) {
- const { gists: pageGists, hasMore: hasMoreGists } = await fetchGists(currentPage);
-
- // Atualiza os gists incrementalmente
- setGists(prev => [...prev, ...pageGists]);
-
- hasMore = hasMoreGists;
- currentPage++;
- }
-
- setLoading(false);
- } catch (err) {
- setError(err instanceof Error ? err.message : 'Erro ao carregar os gists');
- setLoading(false);
- }
- }, []);
-
- useEffect(() => {
- loadAllGists();
- }, [loadAllGists]);
-
- const filteredGists = useMemo(() => {
- if (!searchTerm) return gists;
- const term = searchTerm.toLowerCase();
- return gists.filter(
- gist =>
- gist.cleanTitle.toLowerCase().includes(term) ||
- gist.cleanDescription.toLowerCase().includes(term)
- );
- }, [searchTerm, gists]);
-
- if (loading) {
- return (
-
+ const filteredArticles = useMemo(() => {
+ const term = searchTerm.trim().toLocaleLowerCase('pt-BR');
+ if (!term) return editorialArticles;
+
+ return editorialArticles.filter((article) =>
+ `${article.title} ${article.description} ${article.topic}`
+ .toLocaleLowerCase('pt-BR')
+ .includes(term),
);
- }
-
- if (error) {
- return (
-
-
-
- Blog/Gists
-
-
{error}
-
window.location.reload()}
- className="mt-4 px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 transition-colors"
- >
- Tentar novamente
-
-
-
-
- );
- }
+ }, [searchTerm]);
return (
-
-
-
Blog/Gists
-
- Snippets de código e soluções práticas
+
+
+ Notas técnicas
+
+ Análises práticas de código, arquitetura e decisões de engenharia baseadas em projetos e exemplos mantidos pela HelpDev.
+ Cada nota apresenta o contexto, os limites da solução e referências para conferir a implementação.
+
+
+
+
-
-
- {searchTerm && !loading && (
-
- Encontrados {filteredGists.length} gists
-
- )}
-
- {filteredGists.length === 0 ? (
-
Nenhum gist encontrado com a tag #helpdev-blog
- ) : (
-
- {filteredGists.map((gist) => (
-
+
+ {searchTerm && (
+
+ {filteredArticles.length} {filteredArticles.length === 1 ? 'nota encontrada' : 'notas encontradas'}
+
+ )}
+
+ {filteredArticles.length > 0 ? (
+
+ {filteredArticles.map((article) => (
+
+ {article.topic}
+
+
+ {article.title}
+
+
+ {article.description}
+
+ Leitura técnica · HelpDev
+
+ Ler a análise →
+
+
+
))}
+ ) : (
+
Nenhuma nota corresponde a essa busca.
)}
+
+
+ Código e snippets
+
+ Os Gists públicos reúnem exemplos menores de código. As notas desta página são análises editoriais próprias e apontam para os repositórios usados como fonte.
+
+
+ Ver Gists no GitHub ↗
+
+
);
-}
\ No newline at end of file
+}
diff --git a/src/app/components/Footer/index.tsx b/src/app/components/Footer/index.tsx
index 51dae2b..90dcda0 100644
--- a/src/app/components/Footer/index.tsx
+++ b/src/app/components/Footer/index.tsx
@@ -25,7 +25,7 @@ export const Footer: React.FC = () => {
Artigos
Projetos
Aplicativos
-
Blog
+
Notas técnicas
Contato
Privacidade
diff --git a/src/app/components/Navbar/index.tsx b/src/app/components/Navbar/index.tsx
index ceab568..a11d059 100644
--- a/src/app/components/Navbar/index.tsx
+++ b/src/app/components/Navbar/index.tsx
@@ -86,7 +86,7 @@ export const Navbar = React.memo(() => {
: 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700'
}`}
>
- Blog/Gists
+ Notas técnicas
{
}`}
onClick={closeMenu}
>
- Blog/Gists
+ Notas técnicas
{title}
-
- {languages && languages.map((lang, index) => (
+ {languages.length > 0 &&
+ {languages.map((lang, index) => (
))}
-
+
}
{description}
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index 8743bd1..6543a10 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -3,7 +3,6 @@ import { Inter } from "next/font/google";
import "./globals.css";
import Footer from "./components/Footer";
import GoogleAnalytics from "./components/GoogleAnalytics";
-import AdSenseBanner from "./components/AdSenseBanner";
import Script from "next/script";
import { serviceOfferings } from "@/data/services";
@@ -135,7 +134,6 @@ export default function RootLayout({
}) }}
/>
{children}
-