diff --git a/package.json b/package.json
index fad9469..9fad468 100644
--- a/package.json
+++ b/package.json
@@ -7,7 +7,8 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
- "sass": "sass --watch public/assets/scss/main.scss:public/assets/css/main.css"
+ "sass": "sass --watch public/assets/scss/main.scss:public/assets/css/main.css",
+ "generate-sitemap": "node scripts/generateSitemap.cjs"
},
"dependencies": {
"aos": "^2.3.4",
diff --git a/public/sitemap.xml b/public/sitemap.xml
new file mode 100644
index 0000000..e571a8a
--- /dev/null
+++ b/public/sitemap.xml
@@ -0,0 +1 @@
+
https://tca.metatronnest.com/(event)/photo-gallery/single-galleryweekly0.8https://tca.metatronnest.com/about/associationweekly0.8https://tca.metatronnest.com/about/committeeweekly0.8https://tca.metatronnest.com/about/constitutionweekly0.8https://tca.metatronnest.com/about/missionweekly0.8https://tca.metatronnest.com/aboutweekly0.8https://tca.metatronnest.com/blogweekly0.8https://tca.metatronnest.com/blog-singleweekly0.8https://tca.metatronnest.com/community/badminton-clubweekly0.8https://tca.metatronnest.com/community/business-directoryweekly0.8https://tca.metatronnest.com/community/cricket-clubweekly0.8https://tca.metatronnest.com/community/global-relief-fundweekly0.8https://tca.metatronnest.com/communityweekly0.8https://tca.metatronnest.com/community/recipesweekly0.8https://tca.metatronnest.com/community/single-recipesweekly0.8https://tca.metatronnest.com/community/tamil-schoolweekly0.8https://tca.metatronnest.com/contactweekly0.8https://tca.metatronnest.com/contact%20copyweekly0.8https://tca.metatronnest.com/eventweekly0.8https://tca.metatronnest.com/event-scheduleweekly0.8https://tca.metatronnest.com/event-singleweekly0.8https://tca.metatronnest.com/faqweekly0.8https://tca.metatronnest.com/foodweekly0.8https://tca.metatronnest.com/heritage-languageweekly0.8https://tca.metatronnest.com/index10weekly0.8https://tca.metatronnest.com/index2weekly0.8https://tca.metatronnest.com/index3weekly0.8https://tca.metatronnest.com/index4weekly0.8https://tca.metatronnest.com/index5weekly0.8https://tca.metatronnest.com/index6weekly0.8https://tca.metatronnest.com/index7weekly0.8https://tca.metatronnest.com/index8weekly0.8https://tca.metatronnest.com/index9weekly0.8https://tca.metatronnest.com/memoriesweekly0.8https://tca.metatronnest.com/missionweekly0.8https://tca.metatronnest.com/online/christmasweekly0.8https://tca.metatronnest.com/online/community-picnicweekly0.8https://tca.metatronnest.com/online/kalai-vizhaweekly0.8https://tca.metatronnest.com/online/membership-2024weekly0.8https://tca.metatronnest.com/online/membership-2025weekly0.8https://tca.metatronnest.com/online/performanceweekly0.8https://tca.metatronnest.com/online/registration-formweekly0.8https://tca.metatronnest.com/online/sports-dayweekly0.8https://tca.metatronnest.com/online/tamil-new-yearweekly0.8https://tca.metatronnest.com/online/thai-pongal-2025weekly0.8https://tca.metatronnest.com/online/volunteerweekly0.8https://tca.metatronnest.com/weekly0.8https://tca.metatronnest.com/pricing-planweekly0.8https://tca.metatronnest.com/speakersweekly0.8https://tca.metatronnest.com/speakers-singleweekly0.8https://tca.metatronnest.com/tamil-cultureweekly0.8https://tca.metatronnest.com/tamil-culture/tamil-festivals/christian-festivalsweekly0.8https://tca.metatronnest.com/tamil-culture/tamil-festivals/hindu-festivalsweekly0.8https://tca.metatronnest.com/tamil-culture/tamil-festivals/muslim-festivalsweekly0.8https://tca.metatronnest.com/tamil-culture/tamil-festivalsweekly0.8https://tca.metatronnest.com/tamil-culture/tamil-language/tamil-language-dataweekly0.8https://tca.metatronnest.com/tamil-culture/tamil-wedding-custom/bridal-makeupweekly0.8https://tca.metatronnest.com/tamil-culture/tamil-wedding-custom/catholic-weddingweekly0.8https://tca.metatronnest.com/tamil-culture/tamil-wedding-custom/city-styleweekly0.8https://tca.metatronnest.com/tamil-culture/tamil-wedding-custom/hindu-wedding-ritualsweekly0.8https://tca.metatronnest.com/tamil-culture/tamil-wedding-customweekly0.8https://tca.metatronnest.com/tamil-culture/tamil-wedding-custom/protestant-weddingweekly0.8https://tca.metatronnest.com/tamil-culture/tamil-wedding-custom/story-of-sareeweekly0.8https://tca.metatronnest.com/tamil-culture-postweekly0.8https://tca.metatronnest.com/tamil-culture-post/?slug=instrumental-musicweekly0.6https://tca.metatronnest.com/tamil-culture-post/?slug=bharathnatyam-danceweekly0.6https://tca.metatronnest.com/tamil-culture-post/?slug=vocalweekly0.6
\ No newline at end of file
diff --git a/scripts/generateSitemap.cjs b/scripts/generateSitemap.cjs
new file mode 100644
index 0000000..4ac8c7b
--- /dev/null
+++ b/scripts/generateSitemap.cjs
@@ -0,0 +1,73 @@
+const fs = require('fs');
+const path = require('path');
+const { SitemapStream, streamToPromise } = require('sitemap');
+
+const APP_DIR = path.join(__dirname, '../app');
+
+function getAppRoutes(dir = APP_DIR, baseRoute = '') {
+ let routes = [];
+
+ const items = fs.readdirSync(dir);
+ items.forEach((item) => {
+ const itemPath = path.join(dir, item);
+ const stat = fs.statSync(itemPath);
+
+ if (stat.isDirectory()) {
+ const newBase = baseRoute + '/' + item;
+ routes = routes.concat(getAppRoutes(itemPath, newBase));
+ } else if (item === 'page.tsx' || item === 'page.js') {
+ routes.push(baseRoute || '/');
+ }
+ });
+
+ return routes;
+}
+
+const staticPaths = getAppRoutes().map((url) =>
+ url.endsWith('/') && url !== '/' ? url.slice(0, -1) : url
+);
+
+const staticLinks = staticPaths.map((url) => ({
+ url,
+ changefreq: 'weekly',
+ priority: 0.8,
+}));
+
+// Example dynamic slugs
+const tamilCulturePosts = [
+ { slug: 'instrumental-music' },
+ { slug: 'bharathnatyam-dance' },
+ { slug: 'vocal' },
+];
+
+const cultureLinks = tamilCulturePosts.map((post) => ({
+ url: `/tamil-culture-post/?slug=${post.slug}`,
+ changefreq: 'weekly',
+ priority: 0.64,
+}));
+
+const allLinks = [...staticLinks, ...cultureLinks];
+
+async function generateSitemap() {
+ try {
+ const sitemap = new SitemapStream({
+ hostname: 'https://tca.metatronnest.com',
+ });
+
+ const outputPath = path.resolve(__dirname, '../public/sitemap.xml');
+ const writeStream = fs.createWriteStream(outputPath);
+
+ sitemap.pipe(writeStream);
+
+ allLinks.forEach((link) => sitemap.write(link));
+ sitemap.end();
+
+ await streamToPromise(sitemap);
+
+ console.log(`✅ sitemap.xml created with ${allLinks.length} URLs!`);
+ } catch (err) {
+ console.error('❌ Error generating sitemap:', err);
+ }
+}
+
+generateSitemap();