perf: apply Vercel Next.js best practices (caching, image optimization, metadata)
This commit is contained in:
@@ -9,14 +9,34 @@ export async function generateMetadata({ params }: { params: Promise<{ slug: str
|
||||
if (!data) return {};
|
||||
|
||||
const { project } = data;
|
||||
const url = `https://mugladijitalmedya.com/works/${slug}`;
|
||||
|
||||
return {
|
||||
title: project.title,
|
||||
title: `${project.title} | Muğla Dijital`,
|
||||
description: project.subtitle,
|
||||
alternates: {
|
||||
canonical: url,
|
||||
},
|
||||
openGraph: {
|
||||
title: `${project.title} | Muğla Dijital`,
|
||||
title: `${project.title} | Proje Detayı | Muğla Dijital`,
|
||||
description: project.subtitle,
|
||||
url: url,
|
||||
images: [
|
||||
{
|
||||
url: project.hero_image,
|
||||
width: 1200,
|
||||
height: 630,
|
||||
alt: project.title,
|
||||
}
|
||||
],
|
||||
type: 'article',
|
||||
},
|
||||
twitter: {
|
||||
card: 'summary_large_image',
|
||||
title: project.title,
|
||||
description: project.subtitle,
|
||||
images: [project.hero_image],
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user