feat(seo): expand sitemap and structured data

This commit is contained in:
poyrazavsever
2026-08-31 10:27:33 +03:00
parent e2c33d6b29
commit caf9fceb7a
7 changed files with 304 additions and 98 deletions
+46 -3
View File
@@ -1,5 +1,14 @@
import { ProjectsContent } from "@/components/projects-content";
import { getStaticPageMetadata } from "@/lib/seo";
import { ProjectsJsonLd } from "@/components/json-ld";
import {
EXTENSIONS,
FIGMA_TEMPLATES,
MOBILE_APPS,
WEB_APPS,
} from "@/data/projects";
import { getLocalizedValue } from "@/lib/locale";
import { getLocalizedUrl, getStaticPageMetadata } from "@/lib/seo";
import { getTranslations } from "next-intl/server";
export async function generateMetadata({
params,
@@ -14,6 +23,40 @@ export async function generateMetadata({
});
}
export default function ProjectsPage() {
return <ProjectsContent />;
export default async function ProjectsPage({
params,
}: {
params: Promise<{ locale: string }>;
}) {
const { locale } = await params;
const siteLocale = locale === "en" ? "en" : "tr";
const t = await getTranslations({
locale: siteLocale,
namespace: "Seo.projects",
});
const projects = [
...WEB_APPS,
...MOBILE_APPS,
...EXTENSIONS,
...FIGMA_TEMPLATES,
].map((project) => ({
name: getLocalizedValue(project.title, siteLocale),
description: getLocalizedValue(project.description, siteLocale),
image: project.image,
url: project.href,
technologies: project.technologies,
}));
return (
<>
<ProjectsJsonLd
name={t("title")}
description={t("description")}
url={getLocalizedUrl(siteLocale, "/projects")}
locale={siteLocale}
projects={projects}
/>
<ProjectsContent />
</>
);
}