diff --git a/next.config.ts b/next.config.ts index 846a5c3..f55c447 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,6 +1,7 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { + // Leaner production runtime: deploy uses .next/standalone and drops node_modules. output: "standalone", allowedDevOrigins: ["sanihome.com", "localhost"], }; diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 9fba2c4..b0bfd54 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -29,10 +29,16 @@ const syne = Syne({ export async function generateMetadata(): Promise { const businessInfo = await getBusinessInfo(); + const other: Record = {}; + for (const tag of businessInfo?.metaTags ?? []) { + if (tag.name && tag.content) other[tag.name] = tag.content; + } + return { title: "صنیع هوم | فروشگاه لوازم خانگی", description: "فروشگاه آنلاین لوازم خانگی — یخچال، لباسشویی، تلویزیون و بیشتر", icons: businessInfo?.faviconUrl ? [{ url: businessInfo.faviconUrl }] : undefined, + ...(Object.keys(other).length > 0 ? { other } : {}), }; } diff --git a/src/components/home/Footer.tsx b/src/components/home/Footer.tsx index f3af195..8bfa783 100644 --- a/src/components/home/Footer.tsx +++ b/src/components/home/Footer.tsx @@ -111,6 +111,18 @@ export function Footer({ + {businessInfo?.trustBadges && businessInfo.trustBadges.length > 0 ? ( +
+ {businessInfo.trustBadges.map((badge) => ( +
+ ))} +
+ ) : null} +

© ۱۴۰۵ صنیع هوم — تمامی حقوق محفوظ است.

( } } +export type BusinessMetaTag = { + name: string; + content: string; +}; + +export type BusinessTrustBadge = { + kind: "enamad" | "samandehi"; + embedHtml: string; +}; + export type BusinessInfo = { id: string; name: string; @@ -64,6 +74,8 @@ export type BusinessInfo = { aparat?: string; }; addresses: string[]; + metaTags?: BusinessMetaTag[]; + trustBadges?: BusinessTrustBadge[]; }; export async function getBusinessInfo(): Promise {