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:
co-authored by
Cursor
parent
51fb9f6a26
commit
6543c994c3
+7
-3
@@ -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 }],
|
||||
|
||||
Reference in New Issue
Block a user