-
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added:: Meta Tags, robots.txt, sitemaps for SEO Enhancement
- Loading branch information
1 parent
e5d522e
commit 3e6e763
Showing
6 changed files
with
74 additions
and
0 deletions.
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,21 @@ | ||
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://play-cafe.vercel.app/' }); | ||
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); | ||
}); |
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://play-cafe.vercel.app/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://play-cafe.vercel.app/</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,44 @@ | ||
import React from 'react'; | ||
import { Helmet } from 'react-helmet'; | ||
|
||
const Metadata = () => { | ||
return ( | ||
<Helmet> | ||
<title>Play Cafe - Where Board Games Meet Great Food</title> | ||
|
||
<meta name="description" content="Play Cafe offers a warm and exciting environment for board game enthusiasts to gather, relax, and enjoy great food." /> | ||
|
||
<meta name="keywords" content="cafe, board games, food, gaming, cafe near me, snacks, beverages, fun activities" /> | ||
|
||
<meta name="author" content="Play Cafe" /> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
|
||
{/* Open Graph Tags */} | ||
<meta property="og:title" content="Play Cafe - Where Board Games Meet Great Food" /> | ||
<meta property="og:description" content="Join us at Play Cafe for a fun and immersive experience with board games and delicious food!" /> | ||
<meta property="og:image" content="URL to image for sharing" /> | ||
<meta property="og:url" content="https://play-cafe.vercel.app" /> | ||
<meta property="og:type" content="website" /> | ||
<meta property="og:site_name" content="Play Cafe" /> | ||
|
||
{/* Twitter Card Tags */} | ||
<meta name="twitter:card" content="summary_large_image" /> | ||
<meta name="twitter:title" content="Play Cafe - Where Board Games Meet Great Food" /> | ||
<meta name="twitter:description" content="Play Cafe offers a warm and exciting environment for board game enthusiasts to gather, relax, and enjoy great food." /> | ||
<meta name="twitter:image" content="URL to image for sharing" /> | ||
<meta name="twitter:site" content="@YourTwitterHandle" /> | ||
|
||
|
||
<link rel="canonical" href="https://play-cafe.vercel.app" /> | ||
|
||
<meta name="robots" content="index, follow" /> | ||
|
||
<meta name="theme-color" content="#ffffff" /> | ||
<meta name="rating" content="General" /> | ||
<meta httpEquiv="X-UA-Compatible" content="IE=edge" /> | ||
</Helmet> | ||
); | ||
}; | ||
|
||
export default Metadata; |