From f60c98184bf2a85e4fe217649654801a5030f0ba Mon Sep 17 00:00:00 2001 From: Alireza Hassani Date: Sat, 3 Oct 2026 18:07:14 +0330 Subject: [PATCH] Render CMS meta tags and trust badges from business-info. Injects dashboard-managed meta tags in the head and eNamad/Samandehi HTML in the footer, and enables Next standalone output for deploy. Co-authored-by: Cursor --- next.config.ts | 1 + src/app/layout.tsx | 6 ++++++ src/components/home/Footer.tsx | 12 ++++++++++++ src/lib/meshkee.ts | 12 ++++++++++++ 4 files changed, 31 insertions(+) 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} +