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
This commit is contained in:
@@ -2,6 +2,19 @@ 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,
|
||||
}: {
|
||||
@@ -9,7 +22,10 @@ export async function generateMetadata({
|
||||
}): 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,
|
||||
|
||||
@@ -13,7 +13,12 @@ export async function generateMetadata({
|
||||
}): Promise<Metadata> {
|
||||
const { locale } = await params;
|
||||
const languages = getLanguageAlternates({ pathWithoutLocale: "projects" });
|
||||
const isDe = locale === "de";
|
||||
return {
|
||||
title: isDe ? "Projekte – Dennis Konkol" : "Projects – Dennis Konkol",
|
||||
description: isDe
|
||||
? "Webentwicklung, Fullstack-Apps und Mobile-Projekte von Dennis Konkol. Next.js, Flutter, Docker und mehr – Osnabrück."
|
||||
: "Web development, fullstack apps and mobile projects by Dennis Konkol. Next.js, Flutter, Docker and more – Osnabrück.",
|
||||
alternates: {
|
||||
canonical: toAbsoluteUrl(`/${locale}/projects`),
|
||||
languages,
|
||||
|
||||
Reference in New Issue
Block a user