feat: revamp portfolio with case studies, curriculo page, and local SEO
Adds dynamic case study and curriculo routes, project health monitoring for live demo status, and strengthens local SEO (structured data, service-area targeting for Garuva/Joinville/Curitiba, a dedicated "criação de sites" service page) so search results better match the professional title (Engenheiro da Computação) and experience (5 anos). Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
1 parent
9236fdd685
commit
d76bbf5974
41 files changed
+1359
-492
No files matched your search
@@ -0,0 +1,50 @@
|
||||
import { readFile } from "node:fs/promises";
|
||||
import { resolve } from "node:path";
|
||||
import portfolioData from "@/public/portfolio-data.json";
|
||||
import {
|
||||
createProjectHealthSnapshot,
|
||||
filterLiveProjects,
|
||||
type ProjectHealthSnapshot,
|
||||
} from "./project-health";
|
||||
|
||||
export type PortfolioData = typeof portfolioData;
|
||||
export type PortfolioProject = PortfolioData["projects"][number];
|
||||
export type PortfolioExperience = PortfolioData["experiences"][number];
|
||||
export type PortfolioSkillCategory =
|
||||
PortfolioData["skills"]["technical"][number];
|
||||
|
||||
export const portfolio = portfolioData;
|
||||
|
||||
export function getLiveFeaturedProjects(
|
||||
snapshot: ProjectHealthSnapshot | null,
|
||||
now = new Date(),
|
||||
) {
|
||||
return filterLiveProjects<PortfolioProject>(
|
||||
portfolio.projects,
|
||||
snapshot,
|
||||
now,
|
||||
);
|
||||
}
|
||||
|
||||
export async function loadProjectHealthSnapshot(): Promise<ProjectHealthSnapshot | null> {
|
||||
try {
|
||||
const path = resolve(process.cwd(), "data/project-health.json");
|
||||
return JSON.parse(await readFile(path, "utf8")) as ProjectHealthSnapshot;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
export async function loadLiveFeaturedProjects() {
|
||||
const fromSnapshot = getLiveFeaturedProjects(await loadProjectHealthSnapshot());
|
||||
if (fromSnapshot.length > 0) return fromSnapshot;
|
||||
|
||||
const projectDemos = portfolio.projects.reduce<
|
||||
Array<{ id: string; demoUrl: string }>
|
||||
>((demos, project) => {
|
||||
if (project.demoUrl) demos.push({ id: project.id, demoUrl: project.demoUrl });
|
||||
return demos;
|
||||
}, []);
|
||||
const freshSnapshot = await createProjectHealthSnapshot(projectDemos);
|
||||
return getLiveFeaturedProjects(freshSnapshot);
|
||||
}
|
||||
Reference in new issue
Block a user