Add FA, EN, and AR static copy, with English LTR and catalog hidden outside Persian.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-31 17:29:24 +03:30
co-authored by Cursor
parent 51fb9f6a26
commit 6543c994c3
27 changed files with 1395 additions and 368 deletions
+7 -3
View File
@@ -1,6 +1,7 @@
import type { Metadata } from "next";
import { site } from "@/data/site";
import { defaultLocale, localeOg, type Locale } from "@/i18n/config";
import { getMessages } from "@/i18n/index";
import { websiteDomain } from "@/lib/config";
export const siteUrl = `https://${websiteDomain}`;
@@ -11,15 +12,18 @@ export function pageMetadata({
path = "/",
image,
absolute = false,
locale = defaultLocale,
}: {
title: string;
description: string;
path?: string;
image?: string | null;
absolute?: boolean;
locale?: Locale;
}): Metadata {
const url = `${siteUrl}${path.startsWith("/") ? path : `/${path}`}`;
const ogImage = image || `${siteUrl}/images/slider/bg1.jpg`;
const t = getMessages(locale);
return {
title: absolute ? { absolute: title } : title,
@@ -27,9 +31,9 @@ export function pageMetadata({
alternates: { canonical: url },
openGraph: {
type: path === "/" ? "website" : "article",
locale: "fa_IR",
locale: localeOg[locale],
url,
siteName: site.shortName,
siteName: t.brand.shortName,
title,
description,
images: [{ url: ogImage, alt: title }],