contact file seo-rename, home short metatitle, contact removed form sitemap updated

This commit is contained in:
akash 2025-11-10 20:31:07 +05:30
parent 53a450503d
commit 8536c713f6
8 changed files with 74 additions and 41 deletions

View File

@ -8,7 +8,7 @@ import "@css/slick.min.css";
import "@css/style.css"; import "@css/style.css";
import "./globals.css"; import "./globals.css";
export const metadata = { export const metadata = {
title: "Shivasakthi Restaurant Home-Style South Indian Dining & Weekend Unlimited Thali", title: "Shivasakthi Restaurant | South Indian Dining & Thali",
description: "The best Indian food in Mississauga! Enjoy authentic South Indian cuisine, vegetarian dishes, dosa, Indian snacks, and takeout options at Shiva Sakthi.", description: "The best Indian food in Mississauga! Enjoy authentic South Indian cuisine, vegetarian dishes, dosa, Indian snacks, and takeout options at Shiva Sakthi.",
}; };

View File

@ -12,7 +12,7 @@
<span className="sub-title mb-5 text-white">Craving Authentic Indian Flavors?</span> <span className="sub-title mb-5 text-white">Craving Authentic Indian Flavors?</span>
<h2>Dont waitcall us now to place your order!</h2> <h2>Dont waitcall us now to place your order!</h2>
</div> </div>
<Link href="/contact-us" className="theme-btn style-three"> <Link href="/contact-south-indian-restaurant" className="theme-btn style-three">
Call Us <i className="far fa-arrow-alt-right" /> Call Us <i className="far fa-arrow-alt-right" />
</Link> </Link>
{/* <div {/* <div

View File

@ -88,7 +88,7 @@ const DefaultFooter = () => {
<li><Link href="/">Home</Link></li> <li><Link href="/">Home</Link></li>
<li><Link href="/about">About</Link></li> <li><Link href="/about">About</Link></li>
<li><Link href="/menu">Menu</Link></li> <li><Link href="/menu">Menu</Link></li>
<li><Link href="/contact-us">Contact</Link></li> <li><Link href="/contact-south-indian-restaurant">Contact</Link></li>
</ul> </ul>
</div> </div>
</div> </div>

View File

@ -320,7 +320,7 @@ const MobileMenu = () => {
</div> </div>
</li> */} </li> */}
<li> <li>
<Link href="/contact-us">Contact</Link> <Link href="/contact-south-indian-restaurant">Contact</Link>
</li> </li>
</ul> </ul>
{/* <ul className="navigation clearfix"> {/* <ul className="navigation clearfix">
@ -688,7 +688,7 @@ const Header = () => {
</div> </div>
</li> */} </li> */}
<li> <li>
<Link href="/contact-us">Contact</Link> <Link href="/contact-south-indian-restaurant">Contact</Link>
</li> </li>
</ul> </ul>
<div className="menu-btns" style={{ paddingLeft: "30px" }}> <div className="menu-btns" style={{ paddingLeft: "30px" }}>

View File

@ -2,12 +2,13 @@
"name": "shivasakthi-restarunt", "name": "shivasakthi-restarunt",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",
"build": "next build", "build": "next build",
"start": "next start", "start": "next start",
"lint": "next lint" "lint": "next lint",
}, "sitemap": "node scripts/generate-sitemap.cjs"
},
"dependencies": { "dependencies": {
"aos": "^2.3.4", "aos": "^2.3.4",
"axios": "^1.9.0", "axios": "^1.9.0",

View File

@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://shivasakthi.ca/</loc><changefreq>daily</changefreq><priority>1.0</priority></url><url><loc>https://shivasakthi.ca/about</loc><changefreq>weekly</changefreq><priority>0.7</priority></url><url><loc>https://shivasakthi.ca/menu</loc><changefreq>weekly</changefreq><priority>0.7</priority></url><url><loc>https://shivasakthi.ca/blog</loc><changefreq>weekly</changefreq><priority>0.7</priority></url><url><loc>https://shivasakthi.ca/contact</loc><changefreq>monthly</changefreq><priority>0.5</priority></url><url><loc>https://shivasakthi.ca/blog/the-flavors-of-north-india-more-than-just-curries</loc><changefreq>weekly</changefreq><priority>0.6</priority></url><url><loc>https://shivasakthi.ca/blog/the-secret-to-perfect-north-indian-curries</loc><changefreq>weekly</changefreq><priority>0.6</priority></url><url><loc>https://shivasakthi.ca/blog/the-rich-history-of-south-indian-cuisine</loc><changefreq>weekly</changefreq><priority>0.6</priority></url></urlset> <?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://shivasakthi.ca/</loc><changefreq>daily</changefreq><priority>1.0</priority></url><url><loc>https://shivasakthi.ca/about/</loc><changefreq>weekly</changefreq><priority>0.7</priority></url><url><loc>https://shivasakthi.ca/menu/</loc><changefreq>weekly</changefreq><priority>0.7</priority></url><url><loc>https://shivasakthi.ca/blog/</loc><changefreq>weekly</changefreq><priority>0.7</priority></url><url><loc>https://shivasakthi.ca/contact-south-indian-restaurant/</loc><changefreq>monthly</changefreq><priority>0.5</priority></url><url><loc>https://shivasakthi.ca/blog/the-flavors-of-north-india-more-than-just-curries/</loc><changefreq>weekly</changefreq><priority>0.6</priority></url><url><loc>https://shivasakthi.ca/blog/the-secret-to-perfect-north-indian-curries/</loc><changefreq>weekly</changefreq><priority>0.6</priority></url><url><loc>https://shivasakthi.ca/blog/the-rich-history-of-south-indian-cuisine/</loc><changefreq>weekly</changefreq><priority>0.6</priority></url></urlset>

View File

@ -1,46 +1,78 @@
const fs = require('fs'); const fs = require("fs");
const { SitemapStream, streamToPromise } = require('sitemap'); const path = require("path");
const path = require('path'); const { SitemapStream, streamToPromise } = require("sitemap");
const hostname = "https://shivasakthi.ca";
const addTrailingSlash = true; // Set true if your Next.js has trailingSlash: true
// ✅ Utility to control trailing slashes
const shouldAddSlash = (url) => {
if (url === "/") return false;
if (/\.[a-z0-9]{2,6}(\?.*)?$/i.test(url)) return false;
return true;
};
const formatUrl = (url) => {
if (!url.startsWith("/")) url = "/" + url;
if (addTrailingSlash && shouldAddSlash(url) && !url.endsWith("/")) {
return url + "/";
}
if (!addTrailingSlash && url.endsWith("/") && url !== "/") {
return url.slice(0, -1);
}
return url;
};
// ✅ Static pages
const staticLinks = [ const staticLinks = [
{ url: '/', changefreq: 'daily', priority: 1.0 }, { url: "/", changefreq: "daily", priority: 1.0 },
{ url: '/about', changefreq: 'weekly', priority: 0.7 }, { url: "/about", changefreq: "weekly", priority: 0.7 },
{ url: '/menu', changefreq: 'weekly', priority: 0.7 }, { url: "/menu", changefreq: "weekly", priority: 0.7 },
{ url: '/blog', changefreq: 'weekly', priority: 0.7 }, { url: "/blog", changefreq: "weekly", priority: 0.7 },
{ url: '/contact-us', changefreq: 'monthly', priority: 0.5 } { url: "/contact-south-indian-restaurant", changefreq: "monthly", priority: 0.5 },
]; ];
// ✅ Dynamic blog posts (example) // ✅ Dynamic blog posts (example)
const blogPosts = [ const blogPosts = [
{ slug: 'the-flavors-of-north-india-more-than-just-curries' }, { slug: "/blog/the-flavors-of-north-india-more-than-just-curries/" },
{ slug: 'the-secret-to-perfect-north-indian-curries' }, { slug: "/blog/the-secret-to-perfect-north-indian-curries/" },
{ slug: 'the-rich-history-of-south-indian-cuisine' } { slug: "/blog/the-rich-history-of-south-indian-cuisine/" },
]; ];
// Convert blog slugs to sitemap entries // // Convert blog slugs to sitemap entries
const blogLinks = blogPosts.map(post => ({ const blogLinks = blogPosts.map((post) => ({
url: `/blog/${post.slug}`, url: formatUrl(post.slug),
changefreq: 'weekly', changefreq: "weekly",
priority: 0.6 priority: 0.6,
})); }));
const allLinks = [...staticLinks, ...blogLinks]; const allLinks = [...staticLinks, ...blogLinks].map((link) => ({
...link,
url: formatUrl(link.url),
}));
async function generateSitemap() { async function generateSitemap() {
try { try {
const sitemap = new SitemapStream({ hostname: 'https://shivasakthi.ca/' }); const sitemap = new SitemapStream({ hostname });
const writeStream = fs.createWriteStream(path.resolve(__dirname, '../public/sitemap.xml')); const writeStream = fs.createWriteStream(
path.resolve(__dirname, "../public/sitemap.xml")
);
sitemap.pipe(writeStream); sitemap.pipe(writeStream);
allLinks.forEach(link => sitemap.write(link)); console.log("📦 Writing URLs to sitemap:");
sitemap.end(); allLinks.forEach((link) => {
const fullUrl = `${hostname}${link.url}`;
console.log(" -", fullUrl);
sitemap.write(link);
});
sitemap.end();
await streamToPromise(sitemap); await streamToPromise(sitemap);
console.log('✅ sitemap.xml created with blog slugs!');
console.log("✅ sitemap.xml created successfully!");
} catch (error) { } catch (error) {
console.error('❌ Error creating sitemap.xml:', error); console.error("❌ Error creating sitemap.xml:", error);
} }
} }