feat: implement programmatic SEO routes and optimize meta tags

This commit is contained in:
mstfyldz
2026-05-30 22:02:55 +03:00
parent fa9e3edcd8
commit 7872e8862d
16 changed files with 947 additions and 629 deletions
+2 -2
View File
@@ -7,8 +7,8 @@ export async function generateMetadata({ params }: { params: Promise<{ lang: Loc
const { lang } = await params;
const dict = await getDictionary(lang);
return {
title: `${dict.blog.title} | ${dict.nav.brandName}${dict.nav.brandSub}`,
description: dict.blog.desc,
title: dict.meta.blog.title,
description: dict.meta.blog.desc,
};
}
+2 -2
View File
@@ -6,8 +6,8 @@ export async function generateMetadata({ params }: { params: Promise<{ lang: Loc
const { lang } = await params;
const dict = await getDictionary(lang);
return {
title: `${dict.contact.title} | ${dict.nav.brandName}${dict.nav.brandSub}`,
description: dict.contact.desc,
title: dict.meta.contact.title,
description: dict.meta.contact.desc,
};
}
+49
View File
@@ -0,0 +1,49 @@
import { getDictionary } from "@/get-dictionary";
import type { Locale } from "@/i18n-config";
import WorkClient from "@/components/WorkClient";
import { getProjects } from "@/app/actions";
import { slugify } from "@/lib/utils";
import { notFound } from "next/navigation";
export async function generateMetadata({ params }: { params: Promise<{ lang: Locale, slug: string }> }) {
const { lang, slug } = await params;
const dict = await getDictionary(lang);
const projects = await getProjects();
const filteredProjects = projects.filter((p: any) => slugify(p.tag) === slug);
if (filteredProjects.length === 0) return { title: "Not Found" };
const tagName = filteredProjects[0].tag;
const titleStr = lang === "tr" ? `${tagName} Ajansı` : `${tagName} Agency`;
return {
title: `${titleStr} | ${dict.nav.brandName}`,
description: `${titleStr} - ${dict.work.desc}`,
};
}
export default async function ExpertisePage({ params }: { params: Promise<{ lang: Locale, slug: string }> }) {
const { lang, slug } = await params;
const dict = await getDictionary(lang);
const projects = await getProjects();
const filteredProjects = projects.filter((p: any) => slugify(p.tag) === slug);
if (filteredProjects.length === 0) {
notFound();
}
const tagName = filteredProjects[0].tag;
const titleStr = lang === "tr" ? `${tagName} Ajansı` : `${tagName} Agency`;
// Clone dict to overwrite the work title specifically for this page
const customDict = {
...dict,
work: {
...dict.work,
title: titleStr
}
};
return <WorkClient lang={lang} dict={customDict} initialProjects={filteredProjects} />;
}
+2 -2
View File
@@ -6,8 +6,8 @@ export async function generateMetadata({ params }: { params: Promise<{ lang: Loc
const { lang } = await params;
const dict = await getDictionary(lang);
return {
title: `${dict.faq.title} | ${dict.nav.brandName}${dict.nav.brandSub}`,
description: dict.faq.desc,
title: dict.meta.faq.title,
description: dict.meta.faq.desc,
};
}
+41 -34
View File
@@ -21,41 +21,48 @@ const ibmPlexMono = IBM_Plex_Mono({
variable: "--font-ibm-plex-mono",
});
export const metadata: Metadata = {
metadataBase: new URL('https://ayris.tech'),
title: "Ayris Tech | Forging the Future with AI & Blockchain",
description: "Ayris Tech delivers enterprise-grade digital transformation. We build the impossible for the next generation of business using AI, Blockchain, and modern web technologies.",
keywords: ["AI Solutions", "Blockchain Development", "Mobile App", "Web Development", "Digital Transformation"],
openGraph: {
title: "Ayris Tech | Forging the Future with AI & Blockchain",
description: "Ayris Tech delivers enterprise-grade digital transformation. We build the impossible for the next generation of business using AI, Blockchain, and modern web technologies.",
url: 'https://ayris.tech',
siteName: 'Ayris Tech',
images: [
{
url: '/og-image.jpg',
width: 1200,
height: 630,
alt: 'Ayris Tech - AI & Blockchain Solutions'
}
],
locale: 'en_US',
type: 'website',
},
twitter: {
card: 'summary_large_image',
title: "Ayris Tech | Forging the Future with AI & Blockchain",
description: "Ayris Tech delivers enterprise-grade digital transformation.",
images: ['/og-image.jpg'],
},
alternates: {
canonical: '/',
languages: {
'en': '/en',
'tr': '/tr',
import { getDictionary } from "@/get-dictionary";
export async function generateMetadata({ params }: { params: Promise<{ lang: Locale }> }): Promise<Metadata> {
const { lang } = await params;
const dict = await getDictionary(lang);
return {
metadataBase: new URL('https://ayris.tech'),
title: dict.meta.home.title,
description: dict.meta.home.desc,
keywords: ["AI Solutions", "Blockchain Development", "Mobile App", "Web Development", "Digital Transformation"],
openGraph: {
title: dict.meta.home.title,
description: dict.meta.home.desc,
url: 'https://ayris.tech',
siteName: 'Ayris Tech',
images: [
{
url: '/og-image.jpg',
width: 1200,
height: 630,
alt: 'Ayris Tech - AI & Blockchain Solutions'
}
],
locale: lang === 'tr' ? 'tr_TR' : 'en_US',
type: 'website',
},
},
};
twitter: {
card: 'summary_large_image',
title: dict.meta.home.title,
description: dict.meta.home.desc,
images: ['/og-image.jpg'],
},
alternates: {
canonical: '/',
languages: {
'en': '/en',
'tr': '/tr',
},
},
};
}
const jsonLd = {
'@context': 'https://schema.org',
+2 -2
View File
@@ -6,8 +6,8 @@ export async function generateMetadata({ params }: { params: Promise<{ lang: Loc
const { lang } = await params;
const dict = await getDictionary(lang);
return {
title: `${dict.nav.brandName}${dict.nav.brandSub} | ${dict.hero.badge}`,
description: dict.hero.desc,
title: dict.meta.home.title,
description: dict.meta.home.desc,
};
}
+2 -2
View File
@@ -6,8 +6,8 @@ export async function generateMetadata({ params }: { params: Promise<{ lang: Loc
const { lang } = await params;
const dict = await getDictionary(lang);
return {
title: `${dict.process.title} | ${dict.nav.brandName}${dict.nav.brandSub}`,
description: dict.process.desc,
title: dict.meta.process.title,
description: dict.meta.process.desc,
};
}
+2 -2
View File
@@ -6,8 +6,8 @@ export async function generateMetadata({ params }: { params: Promise<{ lang: Loc
const { lang } = await params;
const dict = await getDictionary(lang);
return {
title: `${dict.services.title} | ${dict.nav.brandName}${dict.nav.brandSub}`,
description: dict.services.desc,
title: dict.meta.services.title,
description: dict.meta.services.desc,
};
}
+2 -2
View File
@@ -7,8 +7,8 @@ export async function generateMetadata({ params }: { params: Promise<{ lang: Loc
const { lang } = await params;
const dict = await getDictionary(lang);
return {
title: `${dict.work.title} | ${dict.nav.brandName}${dict.nav.brandSub}`,
description: dict.work.desc,
title: dict.meta.work.title,
description: dict.meta.work.desc,
};
}