-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #488 from myselfshivams/main
closes : #479 added:: Meta Tags, robots.txt, sitemaps for SEO Enhancement
- Loading branch information
Showing
7 changed files
with
141 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { SitemapStream } from 'sitemap'; | ||
import { createWriteStream } from 'fs'; | ||
import path from 'path'; | ||
import { fileURLToPath } from 'url'; | ||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const pages = [ | ||
{ url: '/', changefreq: 'daily', priority: 1.0 }, | ||
|
||
]; | ||
async function generateSitemap() { | ||
const writeStream = createWriteStream(path.resolve(__dirname, 'public', 'sitemap.xml')); | ||
const sitemap = new SitemapStream({ hostname: 'https://stationguide.onrender.com/' }); | ||
sitemap.pipe(writeStream).on('finish', () => { | ||
console.log('Sitemap generated successfully'); | ||
}); | ||
pages.forEach(page => sitemap.write(page)); | ||
sitemap.end(); | ||
} | ||
generateSitemap().catch(error => { | ||
console.error('Error generating sitemap:', error); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
User-agent: * | ||
Disallow: /private | ||
Allow: / | ||
Sitemap: https://stationguide.onrender.com/sitemap.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +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://stationguide.onrender.com/</loc><changefreq>daily</changefreq><priority>1.0</priority></url></urlset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import React from "react"; | ||
|
||
const Metadata = () => { | ||
return ( | ||
<> | ||
|
||
<title>Station Guide - Your Platform Guide</title> | ||
<meta name="description" content="Station Guide is your go-to resource for navigating platforms with ease. Discover comprehensive guides and tips for a seamless travel experience." /> | ||
<meta name="keywords" content="station guide, platform guide, travel tips, navigation, transportation" /> | ||
<meta name="author" content="Station Guide Team" /> | ||
<meta name="robots" content="index, follow" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="canonical" href="https://stationguide.onrender.com" /> | ||
|
||
<meta property="og:type" content="website" /> | ||
<meta property="og:title" content="Station Guide - Your Platform Guide" /> | ||
<meta property="og:description" content="Explore Station Guide, your comprehensive resource for platform navigation and travel tips." /> | ||
<meta property="og:image" content="URL_TO_IMAGE" /> | ||
<meta property="og:url" content="https://stationguide.onrender.com" /> | ||
<meta property="og:site_name" content="Station Guide" /> | ||
<meta property="og:locale" content="en_US" /> | ||
|
||
<meta name="twitter:card" content="summary_large_image" /> | ||
<meta name="twitter:title" content="Station Guide - Your Platform Guide" /> | ||
<meta name="twitter:description" content="Your essential guide for navigating platforms with ease." /> | ||
<meta name="twitter:image" content="URL_TO_IMAGE" /> | ||
<meta name="twitter:site" content="@YourTwitterHandle" /> | ||
<meta name="twitter:creator" content="@YourTwitterHandle" /> | ||
|
||
<meta name="theme-color" content="#4CAF50" /> | ||
<meta name="apple-mobile-web-app-title" content="Station Guide" /> | ||
<meta name="application-name" content="Station Guide" /> | ||
<meta name="msapplication-TileColor" content="#4CAF50" /> | ||
<meta name="msapplication-config" content="/browserconfig.xml" /> | ||
<meta name="apple-mobile-web-app-status-bar-style" content="default" /> | ||
|
||
<link rel="icon" href="/favicon.ico" sizes="any" /> | ||
<link rel="icon" href="/favicon.svg" type="image/svg+xml" /> | ||
<link rel="apple-touch-icon" href="/apple-touch-icon.png" /> | ||
<link rel="manifest" href="/manifest.json" /> | ||
</> | ||
); | ||
}; | ||
|
||
export default Metadata; |