Add SEO metadata and fix mobile horizontal overflow.

Prevent homepage layout shift on small screens by constraining the hero aspect box and service/product carousels.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-09 17:44:15 +03:30
co-authored by Cursor
parent 701ec5851a
commit ccf8817b26
37 changed files with 692 additions and 134 deletions
+29 -3
View File
@@ -18,11 +18,37 @@ export async function generateMetadata({ params }: PageProps) {
const { slug } = await params;
const { item } = await getBlog(slug);
if (!item) {
return { title: "مقاله | رسام تجارت هواران" };
return {
title: "مقاله",
robots: { index: false, follow: true },
};
}
const description = item.excerpt || item.title;
const image = item.image || "/images/brand/logo.png";
return {
title: `${item.title} | رسام تجارت هواران`,
description: item.excerpt || item.title,
title: item.title,
description,
alternates: {
canonical: `/articles/${item.slug}`,
},
openGraph: {
type: "article",
locale: "fa_IR",
url: `/articles/${item.slug}`,
siteName: "رسام تجارت هواران",
title: item.title,
description,
images: [{ url: image, alt: item.title }],
publishedTime: item.date || undefined,
},
twitter: {
card: "summary_large_image",
title: item.title,
description,
images: [image],
},
};
}