Files
portfolio/app/[locale]/page.tsx
denshooter 049dda8dc5
All checks were successful
CI / CD / test-build (push) Successful in 10m14s
CI / CD / deploy-dev (push) Successful in 1m20s
CI / CD / deploy-production (push) Has been skipped
feat: improve SEO with locale-specific metadata, structured data, and keywords
- Add locale-specific title/description for DE and EN homepage
- Expand keywords with local SEO terms (Webentwicklung Osnabrück, Informatik, etc.)
- Add WebSite schema and enhance Person schema with knowsAbout, alternateName
- Add hreflang alternates for DE/EN
- Update projects page with locale-specific metadata
- Keep visible titles short, move SEO terms to description/structured data
2026-04-19 15:47:22 +02:00

45 lines
1.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import type { Metadata } from "next";
import HomePageServer from "../_ui/HomePageServer";
import { getLanguageAlternates, toAbsoluteUrl } from "@/lib/seo";
const localeMetadata: Record<string, { title: string; description: string }> = {
de: {
title: "Dennis Konkol Webentwickler Osnabrück",
description:
"Dennis Konkol Software Engineer & Webentwickler in Osnabrück. Webentwicklung, Fullstack-Apps, Docker, Next.js, Flutter. Projekte ansehen und Kontakt aufnehmen.",
},
en: {
title: "Dennis Konkol Web Developer Osnabrück",
description:
"Dennis Konkol Software Engineer & Web Developer in Osnabrück, Germany. Web development, fullstack apps, Docker, Next.js, Flutter.",
},
};
export async function generateMetadata({
params,
}: {
params: Promise<{ locale: string }>;
}): Promise<Metadata> {
const { locale } = await params;
const languages = getLanguageAlternates({ pathWithoutLocale: "" });
const meta = localeMetadata[locale] ?? localeMetadata.en;
return {
title: meta.title,
description: meta.description,
alternates: {
canonical: toAbsoluteUrl(`/${locale}`),
languages,
},
};
}
export default async function Page({
params,
}: {
params: Promise<{ locale: string }>;
}) {
const { locale } = await params;
return <HomePageServer locale={locale} />;
}