Compare commits
7 Commits
9af0d83ac3
...
b23b283f4b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b23b283f4b | ||
| 6fd1d44669 | |||
|
|
5720093c80 | ||
| a7a486f40c | |||
| ca7aa8afc3 | |||
| 69c744fae2 | |||
| 1364ee8636 |
@ -4,11 +4,13 @@ import Footer1 from "@/components/footers/Footer1";
|
||||
import Header2 from "@/components/headers/Header2";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
|
||||
export const metadata = {
|
||||
title: "Blog Standard || Xbuild - Constriction nextjs Template",
|
||||
description: "Xbuild - Constriction nextjs Template",
|
||||
title: "Blog Standard || Xbuild - Construction Next.js Template",
|
||||
description: "Xbuild - Construction Next.js Template",
|
||||
};
|
||||
export default function page() {
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<>
|
||||
<Header2 />
|
||||
@ -37,7 +39,7 @@ export default function page() {
|
||||
data-wow-delay=".5s"
|
||||
>
|
||||
<li>
|
||||
<Link href={`/`}> Home </Link>
|
||||
<Link href="/">Home</Link>
|
||||
</li>
|
||||
<li>
|
||||
<i className="fa-sharp fa-solid fa-slash-forward" />
|
||||
|
||||
@ -41,7 +41,7 @@ export default function ContactForm() {
|
||||
if (!formData.number.trim()) errors.number = "Phone number is required.";
|
||||
if (!formData.product.trim()) errors.product = "Please select a product.";
|
||||
if (!formData.message.trim()) errors.message = "Message is required.";
|
||||
if (!captchaToken) errors.captcha = "Please verify the CAPTCHA.";
|
||||
// if (!captchaToken) errors.captcha = "Please verify the CAPTCHA.";
|
||||
|
||||
setFormErrors(errors);
|
||||
if (Object.keys(errors).length > 0) return;
|
||||
@ -213,7 +213,7 @@ export default function ContactForm() {
|
||||
|
||||
<div className="col-lg-12 wow fadeInUp" data-wow-delay=".3s">
|
||||
<ReCAPTCHA
|
||||
sitekey="6LcmnZYrAAAAAL62hHdDnlbvznuOpcHfZIc3DN5b"
|
||||
sitekey="6Lf2wZ8rAAAAAG9QvBXUBP-D9O0SjEKoN-pUDp-d"
|
||||
onChange={handleCaptchaChange}
|
||||
/>
|
||||
{formErrors.captcha && (
|
||||
|
||||
@ -24,7 +24,7 @@ export default function Footer1() {
|
||||
data-wow-delay=".2s"
|
||||
>
|
||||
<Image
|
||||
src="/assets/img/logo/logo.png"
|
||||
src="/assets/img/footer/footer-logo.png"
|
||||
width={300}
|
||||
height={60}
|
||||
alt="img"
|
||||
@ -120,7 +120,7 @@ export default function Footer1() {
|
||||
<h5>Our Products</h5>
|
||||
</div>
|
||||
<ul className="list-area">
|
||||
{allProducts.map((elm, i) => (
|
||||
{allProducts.slice(0, 5).map((elm, i) => (
|
||||
<li key={i}>
|
||||
<Link href={`/product-details/${elm.slug}`}>
|
||||
<i className="fa-solid fa-chevrons-right" />
|
||||
|
||||
@ -48,7 +48,7 @@ export default function ProductDetails({ productItem }) {
|
||||
{imagePair.map((imgSrc, subIndex) => (
|
||||
<div
|
||||
className={`${
|
||||
subIndex === 0 ? "col-lg-6" : "col-lg-6 col-md-12"
|
||||
subIndex === 0 ? "col-md-6 col-12" : "col-md-6 col-12"
|
||||
} mt-2`}
|
||||
key={subIndex}
|
||||
>
|
||||
@ -58,6 +58,7 @@ export default function ProductDetails({ productItem }) {
|
||||
width={633}
|
||||
height={460}
|
||||
alt={`Product Image ${index * 2 + subIndex + 1}`}
|
||||
className="img-fluid"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
12
data/menu.js
@ -72,13 +72,13 @@ export const menuData = [
|
||||
href: "/product",
|
||||
iconClass: "fa-regular fa-plus",
|
||||
submenu: [
|
||||
{ label: "Coconut Deshelling Machine", slug: "coconut-deshelling-machine" },
|
||||
{ label: "Coconut Dryer (Hot Air / Tray Type)", slug: "coconut-dryer-hot-air-tray-type" },
|
||||
{ label: "Coconut Pulverizer & Grinder", slug: "coconut-pulverizer-grinder" },
|
||||
{ label: "Coconut Milk Extractor", slug: "coconut-milk-extractor" },
|
||||
{ label: "Virgin Coconut Oil (VCO) Processing Equipment", slug: "virgin-coconut-oil-vco-processing-equipment" },
|
||||
{ label: "Coconut Water Processing Unit", slug: "coconut-water-processing-unit" },
|
||||
{ label: "Moringa Leaf Chaff Cutter", slug: "moringa-leaf-chaff-cutter" },
|
||||
{ label: "Coconut Cutter", slug: "coconut-cutter" },
|
||||
{ label: "Desiccated Coconut Cooler", slug: "desiccated-coconut-cooler" },
|
||||
{ label: "Belt Conveyor", slug: "belt-conveyor" },
|
||||
{ label: "Coconut Lump Breaker", slug: "coconut-lump-breaker" },
|
||||
],
|
||||
|
||||
},
|
||||
{
|
||||
label: "Turnkey Solutions",
|
||||
|
||||
@ -1,57 +1,57 @@
|
||||
export const serviceItems = [
|
||||
{
|
||||
{
|
||||
id: 1,
|
||||
slug: "coconut-deshelling-machine",
|
||||
imgSrc: "/assets/img/products/coconut-deshelling.webp",
|
||||
iconSrc: "/assets/img/products/icon-1.webp",
|
||||
slug: "moringa-leaf-chaff-cutter",
|
||||
imgSrc: "/assets/img/products/coconut-water.webp",
|
||||
iconSrc: "/assets/img/products/icon-6.webp",
|
||||
number: "01",
|
||||
title: "Coconut Deshelling Machine",
|
||||
description: "Remove coconut shells with high-speed, durable, low-maintenance, energy-efficient, robust deshellers built for continuous production.",
|
||||
title: "Moringa Leaf Chaff Cutter",
|
||||
description: "High-precision cutter designed for efficient moringa leaf processing, ensuring consistent particle size and nutrient retention."
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
slug: "coconut-dryer-hot-air-tray-type",
|
||||
imgSrc: "/assets/img/products/coconut-dryer.webp",
|
||||
iconSrc: "/assets/img/products/icon-2.webp",
|
||||
slug: "coconut-cutter",
|
||||
imgSrc: "/assets/img/products/coconut-water.webp",
|
||||
iconSrc: "/assets/img/products/icon-6.webp",
|
||||
number: "02",
|
||||
title: "Coconut Dryer (Hot Air / Tray Type)",
|
||||
description: "Achieve uniform drying with our energy-efficient, high-capacity dryers designed to preserve quality and extend shelf life.",
|
||||
title: "Coconut Cutter",
|
||||
description: "Fast and precise coconut cutting solution for uniform sectioning, improved efficiency, and minimal kernel damage."
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
slug: "coconut-pulverizer-grinder",
|
||||
imgSrc: "/assets/img/products/coconut-grinder.webp",
|
||||
iconSrc: "/assets/img/products/icon-3.webp",
|
||||
slug: "desiccated-coconut-cooler",
|
||||
imgSrc: "/assets/img/products/coconut-water.webp",
|
||||
iconSrc: "/assets/img/products/icon-6.webp",
|
||||
number: "03",
|
||||
title: "Coconut Pulverizer & Grinder",
|
||||
description: "Grind dried coconut into fine powder with consistent, reliable output, low power, high efficiency, and smooth automated operation.",
|
||||
title: "Desiccated Coconut Cooler",
|
||||
description: "Engineered for rapid cooling of dried coconut flakes while maintaining product quality, texture, and hygiene standards."
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
slug: "coconut-milk-extractor",
|
||||
imgSrc: "/assets/img/products/coconut-milk-extractor.webp",
|
||||
iconSrc: "/assets/img/products/icon-4.webp",
|
||||
slug: "belt-conveyor",
|
||||
imgSrc: "/assets/img/products/coconut-water.webp",
|
||||
iconSrc: "/assets/img/products/icon-6.webp",
|
||||
number: "04",
|
||||
title: "Coconut Milk Extractor",
|
||||
description: "Extract rich, pure coconut milk with hygienic, food-grade, corrosion-resistant machinery suitable for small and industrial-scale operations.",
|
||||
title: "Belt Conveyor",
|
||||
description: "Durable, food-grade belt conveyor designed for smooth material handling and seamless integration into processing lines."
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
slug: "virgin-coconut-oil-vco-processing-equipment",
|
||||
imgSrc: "/assets/img/products/coconut-oil.webp",
|
||||
iconSrc: "/assets/img/products/icon-5.webp",
|
||||
slug: "coconut-lump-breaker",
|
||||
imgSrc: "/assets/img/products/coconut-water.webp",
|
||||
iconSrc: "/assets/img/products/icon-6.webp",
|
||||
number: "05",
|
||||
title: "Virgin Coconut Oil (VCO) Processing Equipment",
|
||||
description: "From cold press systems to filtration and bottling, complete VCO machinery for production.",
|
||||
title: "Coconut Lump Breaker",
|
||||
description: "High-performance lump breaker built for uniform size reduction, smooth material flow, and improved processing efficiency."
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
slug: "coconut-water-processing-unit",
|
||||
slug: "storage-pre-washing",
|
||||
imgSrc: "/assets/img/products/coconut-water.webp",
|
||||
iconSrc: "/assets/img/products/icon-6.webp",
|
||||
number: "06",
|
||||
title: "Coconut Water Processing Unit",
|
||||
description: "Sterilize, filter, and bottle coconut water with modular setups. Designed for scalability, Ensure purity and stability.",
|
||||
title: "Storage & Pre Washing",
|
||||
description: "Automated storage and pre-washing system ensuring efficient cleaning, hygiene, and consistent raw material preparation."
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
47
package-lock.json
generated
@ -20,6 +20,7 @@
|
||||
"react-photoswipe-gallery": "^3.0.2",
|
||||
"react-toastify": "^10.0.5",
|
||||
"sass": "^1.77.8",
|
||||
"sitemap": "^8.0.0",
|
||||
"swiper": "^11.1.9",
|
||||
"wowjs": "^1.1.3",
|
||||
"yet-another-react-lightbox": "^3.25.0"
|
||||
@ -211,6 +212,21 @@
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "17.0.45",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.45.tgz",
|
||||
"integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/sax": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/sax/-/sax-1.2.7.tgz",
|
||||
"integrity": "sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/animate.css": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/animate.css/-/animate.css-4.1.1.tgz",
|
||||
@ -230,6 +246,12 @@
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/arg": {
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
|
||||
"integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
@ -1055,6 +1077,12 @@
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sax": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz",
|
||||
"integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/scheduler": {
|
||||
"version": "0.23.2",
|
||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",
|
||||
@ -1063,6 +1091,25 @@
|
||||
"loose-envify": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sitemap": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/sitemap/-/sitemap-8.0.0.tgz",
|
||||
"integrity": "sha512-+AbdxhM9kJsHtruUF39bwS/B0Fytw6Fr1o4ZAIAEqA6cke2xcoO2GleBw9Zw7nRzILVEgz7zBM5GiTJjie1G9A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/node": "^17.0.5",
|
||||
"@types/sax": "^1.2.1",
|
||||
"arg": "^5.0.0",
|
||||
"sax": "^1.2.4"
|
||||
},
|
||||
"bin": {
|
||||
"sitemap": "dist/cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0",
|
||||
"npm": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
|
||||
|
||||
@ -6,7 +6,8 @@
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
"lint": "next lint",
|
||||
"generate-sitemap": "node scripts/generate-sitemap.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@emailjs/browser": "^4.4.1",
|
||||
@ -21,6 +22,7 @@
|
||||
"react-photoswipe-gallery": "^3.0.2",
|
||||
"react-toastify": "^10.0.5",
|
||||
"sass": "^1.77.8",
|
||||
"sitemap": "^8.0.0",
|
||||
"swiper": "^11.1.9",
|
||||
"wowjs": "^1.1.3",
|
||||
"yet-another-react-lightbox": "^3.25.0"
|
||||
|
||||
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 124 KiB |
BIN
public/assets/img/footer/footer-logo.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 208 KiB |
|
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 335 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 16 KiB |
@ -31,7 +31,7 @@
|
||||
height: 100px;
|
||||
// border-radius: 100px;
|
||||
line-height: 90px;
|
||||
background-color: $white;
|
||||
// background-color: $white;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
188
public/sitemap.xml
Normal file
@ -0,0 +1,188 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/about</loc>
|
||||
<lastmod>2025-08-09T07:53:53.577Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/blog</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/news</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/news-details/[id] copy</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/news-details/[slug]</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/contact</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/corporate-profile</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/engineering-innovation</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/factory-workflows</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/home-1</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/home-1 copy</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/home-1-one-page</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/home-2</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/home-2-one-page</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/404</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/faq</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/pricing</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/team</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/team-details</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/product</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/product-details/[slug]</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/project</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/project-details</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/service</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/service-details</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/sustainability-impact</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/turnkey-solutions</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/product-details/coconut-deshelling-machine</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.6</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/product-details/coconut-dryer-hot-air-tray-type</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.6</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/product-details/coconut-pulverizer-grinder</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.6</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/product-details/coconut-milk-extractor</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.6</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/product-details/virgin-coconut-oil-vco-processing-equipment</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.6</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/product-details/coconut-water-processing-unit</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.6</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/news-details/rise-of-turnkey-coconut-processing-plants</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.6</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/news-details/coconut-deshelling-machine-upgrades</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.6</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://cibusindustries.com/news-details/choosing-the-right-coconut-dryer</loc>
|
||||
<lastmod>2025-08-09T07:53:53.578Z</lastmod>
|
||||
<priority>0.6</priority>
|
||||
</url>
|
||||
</urlset>
|
||||
84
scripts/generate-sitemap.js
Normal file
@ -0,0 +1,84 @@
|
||||
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const { allBlogs, allProducts } = require(path.resolve(__dirname, "../utlis/constant.utils.js"));
|
||||
|
||||
const BASE_URL = "https://cibusindustries.com";
|
||||
const sitemapPath = path.join(__dirname, "../public/sitemap.xml");
|
||||
const appDir = path.join(process.cwd(), "app");
|
||||
|
||||
const getCurrentDate = () => new Date().toISOString();
|
||||
|
||||
const cleanUrl = (url) => {
|
||||
let cleaned = url
|
||||
.replace(/\/\([^)]*\)/g, "")
|
||||
.replace(/\/$/, "");
|
||||
return cleaned === "" ? "/" : cleaned;
|
||||
};
|
||||
|
||||
const getStaticPages = (dir = appDir, basePath = "") => {
|
||||
let urls = [];
|
||||
const files = fs.readdirSync(dir);
|
||||
|
||||
files.forEach((file) => {
|
||||
const filePath = path.join(dir, file);
|
||||
const stat = fs.statSync(filePath);
|
||||
|
||||
if (stat.isDirectory()) {
|
||||
const nested = getStaticPages(filePath, `${basePath}/${file}`);
|
||||
urls = urls.concat(nested);
|
||||
} else if (file.match(/^(page)\.(js|jsx|ts|tsx)$/)) {
|
||||
urls.push(basePath || "/");
|
||||
}
|
||||
});
|
||||
|
||||
return urls;
|
||||
};
|
||||
|
||||
const buildXml = (urls) => {
|
||||
const xmlUrls = urls
|
||||
.map(({ loc, priority }) => {
|
||||
return `
|
||||
<url>
|
||||
<loc>${BASE_URL}${cleanUrl(loc)}</loc>
|
||||
<lastmod>${getCurrentDate()}</lastmod>
|
||||
<priority>${priority}</priority>
|
||||
</url>`;
|
||||
})
|
||||
.join("");
|
||||
|
||||
return `<?xml version="1.0" encoding="UTF-8"?>\n<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">${xmlUrls}
|
||||
</urlset>`;
|
||||
};
|
||||
|
||||
const generateSitemap = () => {
|
||||
const staticPages = getStaticPages().map((route) => ({
|
||||
loc: route,
|
||||
priority: route === "/" ? "1.0" : "0.8",
|
||||
}));
|
||||
|
||||
const productPages = allProducts.map((p) => ({
|
||||
loc: `/product-details/${p.slug}`,
|
||||
priority: "0.6",
|
||||
}));
|
||||
|
||||
const blogPages = allBlogs.map((b) => ({
|
||||
loc: `/news-details/${b.slug}`,
|
||||
priority: "0.6",
|
||||
}));
|
||||
|
||||
const seen = new Set();
|
||||
const allUrls = [...staticPages, ...productPages, ...blogPages].filter((item) => {
|
||||
const cleaned = cleanUrl(item.loc);
|
||||
if (seen.has(cleaned)) return false;
|
||||
seen.add(cleaned);
|
||||
return true;
|
||||
});
|
||||
|
||||
const sitemapXml = buildXml(allUrls);
|
||||
fs.writeFileSync(sitemapPath, sitemapXml, "utf8");
|
||||
|
||||
console.log(`✅ Sitemap generated at: public/sitemap.xml`);
|
||||
};
|
||||
|
||||
generateSitemap();
|
||||