diff --git a/src/app/about/page.tsx b/src/app/about/page.tsx
index ae37ce5..b94b0c3 100644
--- a/src/app/about/page.tsx
+++ b/src/app/about/page.tsx
@@ -1,14 +1,18 @@
+import type { Metadata } from "next";
import Image from "next/image";
import { Footer } from "@/components/Footer";
import { Header } from "@/components/Header";
import { PageHero } from "@/components/PageShared";
import { aboutPage } from "@/data/company";
+import { pageMetadata } from "@/lib/seo";
-export const metadata = {
- title: "درباره ما | رسام تجارت هواران",
+export const metadata: Metadata = pageMetadata({
+ title: "درباره ما",
description:
"درباره شرکت رسام تجارت هواران؛ طراحی، تامین و تولید تجهیزات تهویه مطبوع و سیستمهای مدیریت دود",
-};
+ path: "/about",
+ image: aboutPage.image,
+});
export default function AboutUsPage() {
return (
diff --git a/src/app/articles/[slug]/page.tsx b/src/app/articles/[slug]/page.tsx
index f621f1b..d7294eb 100644
--- a/src/app/articles/[slug]/page.tsx
+++ b/src/app/articles/[slug]/page.tsx
@@ -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],
+ },
};
}
diff --git a/src/app/articles/page.tsx b/src/app/articles/page.tsx
index 607a82c..6dea410 100644
--- a/src/app/articles/page.tsx
+++ b/src/app/articles/page.tsx
@@ -4,11 +4,14 @@ import { PageHero } from "@/components/PageShared";
import { ArticlesGrid } from "@/components/ArticlesGrid";
import { Pagination } from "@/components/Pagination";
import { DEFAULT_LIST_PAGE_SIZE, listBlogs } from "@/lib/meshkee";
+import type { Metadata } from "next";
+import { pageMetadata } from "@/lib/seo";
-export const metadata = {
- title: "مقالات | رسام تجارت هواران",
+export const metadata: Metadata = pageMetadata({
+ title: "مقالات",
description: "مقالات و دانشنامه تخصصی شرکت رسام تجارت هواران",
-};
+ path: "/articles",
+});
type PageProps = {
searchParams: Promise<{ page?: string }>;
diff --git a/src/app/catalog/page.tsx b/src/app/catalog/page.tsx
index c76cd5e..e611b59 100644
--- a/src/app/catalog/page.tsx
+++ b/src/app/catalog/page.tsx
@@ -3,12 +3,15 @@ import { Footer } from "@/components/Footer";
import { Header } from "@/components/Header";
import { PageHero } from "@/components/PageShared";
import { catalogPage } from "@/data/company";
+import type { Metadata } from "next";
+import { pageMetadata } from "@/lib/seo";
-export const metadata = {
- title: "کاتالوگ | رسام تجارت هواران",
+export const metadata: Metadata = pageMetadata({
+ title: "کاتالوگ",
description:
"دانلود کاتالوگ عمومی شرکت رسام تجارت هواران؛ محصولات و فعالیتها",
-};
+ path: "/catalog",
+});
export default function CatalogPage() {
return (
diff --git a/src/app/contact/page.tsx b/src/app/contact/page.tsx
index 3fda5d2..a87fa4d 100644
--- a/src/app/contact/page.tsx
+++ b/src/app/contact/page.tsx
@@ -1,10 +1,13 @@
import type { Metadata } from "next";
import { ContactUsView } from "@/components/ContactUsView";
+import { pageMetadata } from "@/lib/seo";
-export const metadata: Metadata = {
- title: "تماس باما | هواران",
- description: "تماس با رسام تجارت هواران؛ آدرس، تلفن، ایمیل و فرم پیام",
-};
+export const metadata: Metadata = pageMetadata({
+ title: "تماس با ما",
+ description:
+ "تماس با رسام تجارت هواران؛ آدرس دفتر و کارخانه، تلفن، ایمیل و فرم پیام",
+ path: "/contact",
+});
export default function ContactUsPage() {
return ;
diff --git a/src/app/documents/page.tsx b/src/app/documents/page.tsx
index 671012d..e5cf12b 100644
--- a/src/app/documents/page.tsx
+++ b/src/app/documents/page.tsx
@@ -3,12 +3,14 @@ import { Footer } from "@/components/Footer";
import { Header } from "@/components/Header";
import { PageHero } from "@/components/PageShared";
import { documentsCerts, documentsSatisfaction } from "@/data/documents";
+import type { Metadata } from "next";
+import { pageMetadata } from "@/lib/seo";
-export const metadata = {
- title: "مدارک | رسام تجارت هواران",
- description:
- "گواهینامهها و رضایتمندیهای مشتریان رسام تجارت هواران",
-};
+export const metadata: Metadata = pageMetadata({
+ title: "مدارک",
+ description: "گواهینامهها و رضایتمندیهای مشتریان رسام تجارت هواران",
+ path: "/documents",
+});
export default function DocumentsPage() {
return (
diff --git a/src/app/globals.css b/src/app/globals.css
index 00a5aef..74b423a 100644
--- a/src/app/globals.css
+++ b/src/app/globals.css
@@ -165,6 +165,86 @@ img {
box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}
+.meshkee-credit {
+ position: relative;
+}
+
+.meshkee-credit__frame {
+ position: absolute;
+ inset: 0;
+ pointer-events: none;
+}
+
+.meshkee-credit__line {
+ position: absolute;
+ background: #c8c8c8;
+ transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
+}
+
+/* Draw clockwise starting from the left edge */
+.meshkee-credit__line--l {
+ top: 0;
+ left: 0;
+ width: 1px;
+ height: 100%;
+ transform: scaleY(0);
+ transform-origin: top;
+ transition-delay: 0s;
+}
+
+.meshkee-credit__line--b {
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ height: 1px;
+ transform: scaleX(0);
+ transform-origin: left;
+ transition-delay: 0.14s;
+}
+
+.meshkee-credit__line--r {
+ top: 0;
+ right: 0;
+ width: 1px;
+ height: 100%;
+ transform: scaleY(0);
+ transform-origin: bottom;
+ transition-delay: 0.28s;
+}
+
+.meshkee-credit__line--t {
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 1px;
+ transform: scaleX(0);
+ transform-origin: right;
+ transition-delay: 0.42s;
+}
+
+.meshkee-credit:hover .meshkee-credit__line--l,
+.meshkee-credit:hover .meshkee-credit__line--r {
+ transform: scaleY(1);
+}
+
+.meshkee-credit:hover .meshkee-credit__line--t,
+.meshkee-credit:hover .meshkee-credit__line--b {
+ transform: scaleX(1);
+}
+
+.meshkee-credit:not(:hover) .meshkee-credit__line--l {
+ transition-delay: 0.42s;
+}
+.meshkee-credit:not(:hover) .meshkee-credit__line--b {
+ transition-delay: 0.28s;
+}
+.meshkee-credit:not(:hover) .meshkee-credit__line--r {
+ transition-delay: 0.14s;
+}
+.meshkee-credit:not(:hover) .meshkee-credit__line--t {
+ transition-delay: 0s;
+}
+
.round-box {
border-radius: 8px;
overflow: hidden;
diff --git a/src/app/ims-policy/page.tsx b/src/app/ims-policy/page.tsx
index 9905f89..1fbe6f4 100644
--- a/src/app/ims-policy/page.tsx
+++ b/src/app/ims-policy/page.tsx
@@ -2,12 +2,15 @@ import { Footer } from "@/components/Footer";
import { Header } from "@/components/Header";
import { PageHero } from "@/components/PageShared";
import { imsPolicy } from "@/data/company";
+import type { Metadata } from "next";
+import { pageMetadata } from "@/lib/seo";
-export const metadata = {
- title: "خط مشی سیستم مدیریت یکپارچه | رسام تجارت هواران",
+export const metadata: Metadata = pageMetadata({
+ title: "خط مشی سیستم مدیریت یکپارچه",
description:
"خط مشی سیستم مدیریت یکپارچه (IMS) شرکت رسام تجارت هواران بر اساس استانداردهای ISO 9001، ISO 14001 و ISO 45001",
-};
+ path: "/ims-policy",
+});
export default function ImsPolicyPage() {
return (
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index 929d52c..c843943 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -1,14 +1,84 @@
-import type { Metadata } from "next";
+import type { Metadata, Viewport } from "next";
import { LatinDigitsEnhancer } from "@/components/LatinDigits";
+import {
+ DEFAULT_DESCRIPTION,
+ DEFAULT_OG_IMAGE,
+ SITE_KEYWORDS,
+ SITE_NAME,
+ SITE_NAME_EN,
+ SITE_URL,
+ organizationJsonLd,
+ websiteJsonLd,
+} from "@/lib/seo";
import "./globals.css";
export const metadata: Metadata = {
- title: "صفحه اصلی | رسام تجارت هواران",
- description:
- "شرکت رسام تجارت هواران در حوزه طراحی و تولید تجهیزاتی نظیر چیلر، فن، هواساز، فن کویل و غیره و همچنین توان و تجربه در امور بازرگانی اعضای مجموعه خود آماده همکاری و ارائه خدمات در این زمینه است.",
- icons: {
- icon: "/favicon.png",
+ metadataBase: new URL(SITE_URL),
+ title: {
+ default: `${SITE_NAME} | طراحی و تولید تجهیزات تهویه مطبوع`,
+ template: `%s | ${SITE_NAME}`,
},
+ description: DEFAULT_DESCRIPTION,
+ applicationName: SITE_NAME,
+ authors: [{ name: SITE_NAME, url: SITE_URL }],
+ creator: SITE_NAME,
+ publisher: SITE_NAME,
+ keywords: SITE_KEYWORDS,
+ category: "business",
+ icons: {
+ icon: [
+ { url: "/favicon.ico", sizes: "any" },
+ { url: "/favicon.png", type: "image/png", sizes: "512x512" },
+ { url: "/images/brand/logo.png", type: "image/png" },
+ ],
+ apple: [{ url: "/favicon.png", type: "image/png", sizes: "512x512" }],
+ shortcut: ["/favicon.ico"],
+ },
+ openGraph: {
+ type: "website",
+ locale: "fa_IR",
+ url: SITE_URL,
+ siteName: SITE_NAME,
+ title: `${SITE_NAME} | ${SITE_NAME_EN}`,
+ description: DEFAULT_DESCRIPTION,
+ images: [
+ {
+ url: DEFAULT_OG_IMAGE,
+ alt: SITE_NAME,
+ },
+ ],
+ },
+ twitter: {
+ card: "summary_large_image",
+ title: `${SITE_NAME} | ${SITE_NAME_EN}`,
+ description: DEFAULT_DESCRIPTION,
+ images: [DEFAULT_OG_IMAGE],
+ },
+ robots: {
+ index: true,
+ follow: true,
+ googleBot: {
+ index: true,
+ follow: true,
+ "max-image-preview": "large",
+ "max-snippet": -1,
+ "max-video-preview": -1,
+ },
+ },
+ alternates: {
+ canonical: "/",
+ },
+ formatDetection: {
+ telephone: true,
+ email: true,
+ address: true,
+ },
+};
+
+export const viewport: Viewport = {
+ width: "device-width",
+ initialScale: 1,
+ themeColor: "#002776",
};
export default function RootLayout({
@@ -16,9 +86,15 @@ export default function RootLayout({
}: Readonly<{
children: React.ReactNode;
}>) {
+ const jsonLd = [organizationJsonLd(), websiteJsonLd()];
+
return (
+
{children}
diff --git a/src/app/manifest.ts b/src/app/manifest.ts
new file mode 100644
index 0000000..3ecf180
--- /dev/null
+++ b/src/app/manifest.ts
@@ -0,0 +1,30 @@
+import type { MetadataRoute } from "next";
+import { SITE_NAME, SITE_NAME_EN, DEFAULT_DESCRIPTION } from "@/lib/seo";
+
+export default function manifest(): MetadataRoute.Manifest {
+ return {
+ name: SITE_NAME,
+ short_name: SITE_NAME_EN,
+ description: DEFAULT_DESCRIPTION,
+ start_url: "/",
+ display: "standalone",
+ background_color: "#ffffff",
+ theme_color: "#002776",
+ lang: "fa",
+ dir: "rtl",
+ icons: [
+ {
+ src: "/favicon.png",
+ sizes: "512x512",
+ type: "image/png",
+ purpose: "any",
+ },
+ {
+ src: "/images/brand/logo.png",
+ sizes: "512x512",
+ type: "image/png",
+ purpose: "any",
+ },
+ ],
+ };
+}
diff --git a/src/app/not-found.tsx b/src/app/not-found.tsx
new file mode 100644
index 0000000..a70c2fc
--- /dev/null
+++ b/src/app/not-found.tsx
@@ -0,0 +1,35 @@
+import type { Metadata } from "next";
+import Link from "next/link";
+import { Footer } from "@/components/Footer";
+import { Header } from "@/components/Header";
+
+export const metadata: Metadata = {
+ title: "صفحه پیدا نشد",
+ robots: {
+ index: false,
+ follow: true,
+ },
+};
+
+export default function NotFound() {
+ return (
+ <>
+
+
+
+
404
+
+ صفحه مورد نظر پیدا نشد
+
+
+ ممکن است آدرس تغییر کرده باشد یا صفحه حذف شده باشد.
+
+
+ بازگشت به صفحه اصلی
+
+
+
+
+ >
+ );
+}
diff --git a/src/app/page.tsx b/src/app/page.tsx
index de6fd3b..c58326b 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1,3 +1,4 @@
+import type { Metadata } from "next";
import { About } from "@/components/About";
import { Articles } from "@/components/Articles";
import { Clients } from "@/components/Clients";
@@ -10,6 +11,18 @@ import { Products } from "@/components/Products";
import { Services } from "@/components/Services";
import { Solutions } from "@/components/Solutions";
import { SpecialProducts } from "@/components/SpecialProducts";
+import { DEFAULT_DESCRIPTION, pageMetadata } from "@/lib/seo";
+
+export const metadata: Metadata = {
+ ...pageMetadata({
+ title: "صفحه اصلی",
+ description: DEFAULT_DESCRIPTION,
+ path: "/",
+ }),
+ title: {
+ absolute: "رسام تجارت هواران | طراحی و تولید تجهیزات تهویه مطبوع",
+ },
+};
export default function Home() {
return (
diff --git a/src/app/portfolios/[slug]/page.tsx b/src/app/portfolios/[slug]/page.tsx
index 8209e79..25d6290 100644
--- a/src/app/portfolios/[slug]/page.tsx
+++ b/src/app/portfolios/[slug]/page.tsx
@@ -18,13 +18,37 @@ export async function generateMetadata({ params }: PageProps) {
const { slug } = await params;
const { item } = await getPortfolio(slug);
if (!item) {
- return { title: "پروژه | رسام تجارت هواران" };
+ return {
+ title: "پروژه",
+ robots: { index: false, follow: true },
+ };
}
+
+ const description =
+ item.description || `نمونه کار ${item.title} — شرکت رسام تجارت هواران`;
+ const image = item.coverImage || item.image || "/images/brand/logo.png";
+
return {
- title: `${item.title} | رسام تجارت هواران`,
- description:
- item.description ||
- `نمونه کار ${item.title} — شرکت رسام تجارت هواران`,
+ title: item.title,
+ description,
+ alternates: {
+ canonical: `/portfolios/${item.slug}`,
+ },
+ openGraph: {
+ type: "website",
+ locale: "fa_IR",
+ url: `/portfolios/${item.slug}`,
+ siteName: "رسام تجارت هواران",
+ title: item.title,
+ description,
+ images: [{ url: image, alt: item.title }],
+ },
+ twitter: {
+ card: "summary_large_image",
+ title: item.title,
+ description,
+ images: [image],
+ },
};
}
diff --git a/src/app/portfolios/page.tsx b/src/app/portfolios/page.tsx
index 1ea3aa2..c04384a 100644
--- a/src/app/portfolios/page.tsx
+++ b/src/app/portfolios/page.tsx
@@ -4,11 +4,14 @@ import { PageHero } from "@/components/PageShared";
import { PortfolioGrid } from "@/components/PortfolioGrid";
import { Pagination } from "@/components/Pagination";
import { DEFAULT_LIST_PAGE_SIZE, listPortfolios } from "@/lib/meshkee";
+import type { Metadata } from "next";
+import { pageMetadata } from "@/lib/seo";
-export const metadata = {
- title: "پروژه ها | رسام تجارت هواران",
+export const metadata: Metadata = pageMetadata({
+ title: "پروژه ها",
description: "پروژه ها و نمونه کار های شرکت رسام تجارت هواران",
-};
+ path: "/portfolios",
+});
type PageProps = {
searchParams: Promise<{ page?: string }>;
diff --git a/src/app/products/air-conditioner/page.tsx b/src/app/products/air-conditioner/page.tsx
index d77ad30..28b744e 100644
--- a/src/app/products/air-conditioner/page.tsx
+++ b/src/app/products/air-conditioner/page.tsx
@@ -4,11 +4,15 @@ import { Footer } from "@/components/Footer";
import { Header } from "@/components/Header";
import { PageHero, SpecList } from "@/components/PageShared";
import { ahuAdvantages, ahuFaq, ahuIntro } from "@/data/ahu";
+import type { Metadata } from "next";
+import { pageMetadata } from "@/lib/seo";
-export const metadata = {
- title: "هواساز | رسام تجارت هواران",
+export const metadata: Metadata = pageMetadata({
+ title: "هواساز",
description: "خرید انواع هواساز با قیمت مناسب و گارانتی معتبر",
-};
+ path: "/products/air-conditioner",
+ image: "/images/products/ahu.png",
+});
export default function AirConditionerPage() {
return (
diff --git a/src/app/products/chiller/page.tsx b/src/app/products/chiller/page.tsx
index e88f703..1186811 100644
--- a/src/app/products/chiller/page.tsx
+++ b/src/app/products/chiller/page.tsx
@@ -4,11 +4,15 @@ import { Footer } from "@/components/Footer";
import { Header } from "@/components/Header";
import { PageHero, SpecList } from "@/components/PageShared";
import { chillerBlocks, chillerFaq, chillerIntro } from "@/data/chiller";
+import type { Metadata } from "next";
+import { pageMetadata } from "@/lib/seo";
-export const metadata = {
- title: "چیلر | رسام تجارت هواران",
- description: "خرید انواع چیلر با قیمت مناسب و کیفیت بالا | رسام تجارت هواران",
-};
+export const metadata: Metadata = pageMetadata({
+ title: "چیلر",
+ description: "خرید انواع چیلر با قیمت مناسب و کیفیت بالا",
+ path: "/products/chiller",
+ image: "/images/pages/chiller/air-cooled.png",
+});
export default function ChillerPage() {
return (
diff --git a/src/app/products/f300/page.tsx b/src/app/products/f300/page.tsx
index 610a295..144c482 100644
--- a/src/app/products/f300/page.tsx
+++ b/src/app/products/f300/page.tsx
@@ -4,12 +4,15 @@ import { Footer } from "@/components/Footer";
import { Header } from "@/components/Header";
import { PageHero } from "@/components/PageShared";
import { f300Blocks, f300Intro } from "@/data/f300";
+import type { Metadata } from "next";
+import { pageMetadata } from "@/lib/seo";
-export const metadata = {
- title: "فن تخلیه دود F300 | رسام تجارت هواران",
- description:
- "فن تخلیه دود f300 با بهترین قیمت و کیفیت مناسب | رسام تجارت هواران",
-};
+export const metadata: Metadata = pageMetadata({
+ title: "فن تخلیه دود F300",
+ description: "فن تخلیه دود F300 با بهترین قیمت و کیفیت مناسب",
+ path: "/products/f300",
+ image: "/images/pages/f300/hero.jpg",
+});
export default function F300Page() {
return (
diff --git a/src/app/products/fancoil/page.tsx b/src/app/products/fancoil/page.tsx
index 8f533ac..baab08c 100644
--- a/src/app/products/fancoil/page.tsx
+++ b/src/app/products/fancoil/page.tsx
@@ -4,11 +4,15 @@ import { Footer } from "@/components/Footer";
import { Header } from "@/components/Header";
import { PageHero, SpecList } from "@/components/PageShared";
import { fancoilBlocks, fancoilFaq, fancoilIntro } from "@/data/fancoil";
+import type { Metadata } from "next";
+import { pageMetadata } from "@/lib/seo";
-export const metadata = {
- title: "فن کویل | رسام تجارت هواران",
- description: "خرید انواع فن کویل با کیفیت مناسب | رسام تجارت هواران",
-};
+export const metadata: Metadata = pageMetadata({
+ title: "فن کویل",
+ description: "خرید انواع فن کویل با کیفیت مناسب",
+ path: "/products/fancoil",
+ image: "/images/products/fancoil.png",
+});
export default function FanCoilPage() {
return (
diff --git a/src/app/products/havaran-fan/page.tsx b/src/app/products/havaran-fan/page.tsx
index aff13e9..fa0088a 100644
--- a/src/app/products/havaran-fan/page.tsx
+++ b/src/app/products/havaran-fan/page.tsx
@@ -1,3 +1,4 @@
+import type { Metadata } from "next";
import Image from "next/image";
import { Accordion } from "@/components/Accordion";
import { Footer } from "@/components/Footer";
@@ -9,11 +10,14 @@ import {
havaranFanCentrifugal,
havaranFanFaq,
} from "@/data/havaranFan";
+import { pageMetadata } from "@/lib/seo";
-export const metadata = {
- title: "فن هواران | رسام تجارت هواران",
+export const metadata: Metadata = pageMetadata({
+ title: "فن هواران",
description: "خرید انواع فن های هواران با بهترین کیفیت",
-};
+ path: "/products/havaran-fan",
+ image: "/images/products/havaran-fan.png",
+});
export default function HavaranFanPage() {
const axialBlocks = havaranFanBlocks.filter((b) => b.group === "axial");
diff --git a/src/app/products/page.tsx b/src/app/products/page.tsx
index 36abb21..ae90cc7 100644
--- a/src/app/products/page.tsx
+++ b/src/app/products/page.tsx
@@ -2,12 +2,15 @@ import { Footer } from "@/components/Footer";
import { Header } from "@/components/Header";
import { CatalogCard, PageHero } from "@/components/PageShared";
import { productsList } from "@/data/pages";
+import type { Metadata } from "next";
+import { pageMetadata } from "@/lib/seo";
-export const metadata = {
- title: "محصولات | رسام تجارت هواران",
+export const metadata: Metadata = pageMetadata({
+ title: "محصولات",
description:
"خرید انواع فن تخلیه دود F300، فن هواران، چیلر، فن کویل و هواساز از رسام تجارت هواران",
-};
+ path: "/products",
+});
export default function ProductsPage() {
return (
diff --git a/src/app/robots.ts b/src/app/robots.ts
new file mode 100644
index 0000000..b169a6b
--- /dev/null
+++ b/src/app/robots.ts
@@ -0,0 +1,16 @@
+import type { MetadataRoute } from "next";
+import { SITE_URL } from "@/lib/seo";
+
+export default function robots(): MetadataRoute.Robots {
+ return {
+ rules: [
+ {
+ userAgent: "*",
+ allow: "/",
+ disallow: ["/api/", "/blogs", "/projects", "/article-details/", "/portfolio-details/"],
+ },
+ ],
+ sitemap: `${SITE_URL}/sitemap.xml`,
+ host: SITE_URL,
+ };
+}
diff --git a/src/app/sitemap.ts b/src/app/sitemap.ts
new file mode 100644
index 0000000..b03a9c0
--- /dev/null
+++ b/src/app/sitemap.ts
@@ -0,0 +1,63 @@
+import type { MetadataRoute } from "next";
+import { articlesFallback } from "@/data/articles";
+import { productsList, solutionsList } from "@/data/pages";
+import { portfoliosFallback } from "@/data/portfolios";
+import { SITE_URL } from "@/lib/seo";
+
+const staticRoutes: Array<{
+ path: string;
+ changeFrequency: MetadataRoute.Sitemap[number]["changeFrequency"];
+ priority: number;
+}> = [
+ { path: "/", changeFrequency: "weekly", priority: 1 },
+ { path: "/products", changeFrequency: "weekly", priority: 0.9 },
+ { path: "/solutions", changeFrequency: "weekly", priority: 0.9 },
+ { path: "/portfolios", changeFrequency: "weekly", priority: 0.8 },
+ { path: "/articles", changeFrequency: "weekly", priority: 0.8 },
+ { path: "/documents", changeFrequency: "monthly", priority: 0.7 },
+ { path: "/catalog", changeFrequency: "monthly", priority: 0.7 },
+ { path: "/about", changeFrequency: "monthly", priority: 0.7 },
+ { path: "/contact", changeFrequency: "monthly", priority: 0.7 },
+ { path: "/ims-policy", changeFrequency: "yearly", priority: 0.5 },
+];
+
+export default function sitemap(): MetadataRoute.Sitemap {
+ const lastModified = new Date();
+
+ const pages = staticRoutes.map((route) => ({
+ url: `${SITE_URL}${route.path === "/" ? "" : route.path}`,
+ lastModified,
+ changeFrequency: route.changeFrequency,
+ priority: route.priority,
+ }));
+
+ const products = productsList.map((item) => ({
+ url: `${SITE_URL}${item.href}`,
+ lastModified,
+ changeFrequency: "monthly" as const,
+ priority: 0.8,
+ }));
+
+ const solutions = solutionsList.map((item) => ({
+ url: `${SITE_URL}${item.href}`,
+ lastModified,
+ changeFrequency: "monthly" as const,
+ priority: 0.75,
+ }));
+
+ const articles = articlesFallback.map((item) => ({
+ url: `${SITE_URL}/articles/${item.slug}`,
+ lastModified: item.date ? new Date(item.date) : lastModified,
+ changeFrequency: "monthly" as const,
+ priority: 0.6,
+ }));
+
+ const portfolios = portfoliosFallback.map((item) => ({
+ url: `${SITE_URL}/portfolios/${item.slug}`,
+ lastModified,
+ changeFrequency: "monthly" as const,
+ priority: 0.6,
+ }));
+
+ return [...pages, ...products, ...solutions, ...articles, ...portfolios];
+}
diff --git a/src/app/solutions/building-installations/page.tsx b/src/app/solutions/building-installations/page.tsx
index 66e0d8b..160270c 100644
--- a/src/app/solutions/building-installations/page.tsx
+++ b/src/app/solutions/building-installations/page.tsx
@@ -1,10 +1,14 @@
import { Footer } from "@/components/Footer";
import { Header } from "@/components/Header";
import { PageHero, UpdatingNotice } from "@/components/PageShared";
+import type { Metadata } from "next";
+import { pageMetadata } from "@/lib/seo";
-export const metadata = {
- title: "تاسیسات ساختمانی | هواران",
-};
+export const metadata: Metadata = pageMetadata({
+ title: "تاسیسات ساختمانی",
+ description: "خدمات و تجهیزات تاسیسات ساختمانی رسام تجارت هواران",
+ path: "/solutions/building-installations",
+});
export default function BuildingInstallationsPage() {
return (
diff --git a/src/app/solutions/building-smoke-management/page.tsx b/src/app/solutions/building-smoke-management/page.tsx
index 0f04835..960a8cb 100644
--- a/src/app/solutions/building-smoke-management/page.tsx
+++ b/src/app/solutions/building-smoke-management/page.tsx
@@ -3,11 +3,15 @@ import { Footer } from "@/components/Footer";
import { Header } from "@/components/Header";
import { PageHero } from "@/components/PageShared";
import { smokeBlocks, smokeIntro } from "@/data/smoke";
+import type { Metadata } from "next";
+import { pageMetadata } from "@/lib/seo";
-export const metadata = {
- title: "مدیریت دود ساختمان | هواران",
- description: "سیستم های مدیریت دود ساختمان | رسام تجارت هواران",
-};
+export const metadata: Metadata = pageMetadata({
+ title: "مدیریت دود ساختمان",
+ description: "طراحی، تامین و اجرای سیستمهای مدیریت دود ساختمان",
+ path: "/solutions/building-smoke-management",
+ image: "/images/pages/smoke/hero.png",
+});
export default function SmokeManagementPage() {
return (
diff --git a/src/app/solutions/hvac/page.tsx b/src/app/solutions/hvac/page.tsx
index 35c7822..3e19720 100644
--- a/src/app/solutions/hvac/page.tsx
+++ b/src/app/solutions/hvac/page.tsx
@@ -1,10 +1,14 @@
import { Footer } from "@/components/Footer";
import { Header } from "@/components/Header";
import { PageHero, UpdatingNotice } from "@/components/PageShared";
+import type { Metadata } from "next";
+import { pageMetadata } from "@/lib/seo";
-export const metadata = {
- title: "تهویه مطبوع | هواران",
-};
+export const metadata: Metadata = pageMetadata({
+ title: "تهویه مطبوع",
+ description: "سیستمهای تهویه مطبوع برای فضاهای مسکونی، اداری و تجاری",
+ path: "/solutions/hvac",
+});
export default function HvacSolutionPage() {
return (
diff --git a/src/app/solutions/page.tsx b/src/app/solutions/page.tsx
index d9c5e10..8fd256c 100644
--- a/src/app/solutions/page.tsx
+++ b/src/app/solutions/page.tsx
@@ -2,12 +2,15 @@ import { Footer } from "@/components/Footer";
import { Header } from "@/components/Header";
import { CatalogCard, PageHero } from "@/components/PageShared";
import { solutionsList } from "@/data/pages";
+import type { Metadata } from "next";
+import { pageMetadata } from "@/lib/seo";
-export const metadata = {
- title: "راهکارها | رسام تجارت هواران",
+export const metadata: Metadata = pageMetadata({
+ title: "راهکارها",
description:
"راهکارهای مدیریت دود ساختمان، تهویه فضاهای مختلف، تهویه مطبوع، تونل و مترو و تاسیسات ساختمانی",
-};
+ path: "/solutions",
+});
export default function SolutionsPage() {
return (
diff --git a/src/app/solutions/tunnels-and-subways/page.tsx b/src/app/solutions/tunnels-and-subways/page.tsx
index f8b4bd4..f1bfda2 100644
--- a/src/app/solutions/tunnels-and-subways/page.tsx
+++ b/src/app/solutions/tunnels-and-subways/page.tsx
@@ -3,11 +3,15 @@ import { Footer } from "@/components/Footer";
import { Header } from "@/components/Header";
import { PageHero } from "@/components/PageShared";
import { tunnelBlocks, tunnelIntro } from "@/data/tunnel";
+import type { Metadata } from "next";
+import { pageMetadata } from "@/lib/seo";
-export const metadata = {
- title: "تونل و مترو | هواران",
- description: "راهکارهای تهویه تونل و مترو | رسام تجارت هواران",
-};
+export const metadata: Metadata = pageMetadata({
+ title: "تونل و مترو",
+ description: "راهکارهای تهویه تونل و مترو",
+ path: "/solutions/tunnels-and-subways",
+ image: "/images/pages/f300/axial-jet.png",
+});
export default function TunnelsPage() {
return (
diff --git a/src/app/solutions/ventilation-spaces/page.tsx b/src/app/solutions/ventilation-spaces/page.tsx
index b0ec878..09a1315 100644
--- a/src/app/solutions/ventilation-spaces/page.tsx
+++ b/src/app/solutions/ventilation-spaces/page.tsx
@@ -1,10 +1,14 @@
import { Footer } from "@/components/Footer";
import { Header } from "@/components/Header";
import { PageHero, UpdatingNotice } from "@/components/PageShared";
+import type { Metadata } from "next";
+import { pageMetadata } from "@/lib/seo";
-export const metadata = {
- title: "تهویه فضاهای مختلف | هواران",
-};
+export const metadata: Metadata = pageMetadata({
+ title: "تهویه فضاهای مختلف",
+ description: "راهکارهای تهویه برای فضاهای گوناگون ساختمانی و صنعتی",
+ path: "/solutions/ventilation-spaces",
+});
export default function VentilationSpacesPage() {
return (
diff --git a/src/components/ContactUsView.tsx b/src/components/ContactUsView.tsx
index 10249eb..b9e052e 100644
--- a/src/components/ContactUsView.tsx
+++ b/src/components/ContactUsView.tsx
@@ -152,7 +152,8 @@ export function ContactUsView() {
{phone}
diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx
index ffc76de..dad9cf8 100644
--- a/src/components/Footer.tsx
+++ b/src/components/Footer.tsx
@@ -1,11 +1,9 @@
-"use client";
-
import Image from "next/image";
import { footerLinks, site } from "@/data/home";
export function Footer() {
return (
-