-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added:: Missing Meta Tags, robots.txt, sitemaps for SEO Enhancement (#…
…412)
- Loading branch information
1 parent
121635b
commit 2db9ef6
Showing
6 changed files
with
70 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,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://befiteveryday.netlify.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://befiteveryday.netlify.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://befiteveryday.netlify.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,39 @@ | ||
import { Helmet } from "react-helmet"; | ||
|
||
const Metadata = () => ( | ||
<Helmet> | ||
<title>FitFlex - Your Fitness Journey</title> | ||
<meta | ||
name="description" | ||
content="FitFlex is a fitness and weight loss website offering daily, structured workout plans for a set period. Users can follow day-wise exercises tailored to their goals." | ||
/> | ||
<meta name="keywords" content="fitness, weight loss, workout plans, health, exercise" /> | ||
<meta name="author" content="Your Name" /> | ||
|
||
|
||
<meta property="og:title" content="FitFlex - Your Fitness Journey" /> | ||
<meta | ||
property="og:description" | ||
content="Join FitFlex to access daily workout plans that cater to your fitness goals." | ||
/> | ||
<meta property="og:image" content="https://befiteveryday.netlify.app/og-image.jpg" /> | ||
<meta property="og:url" content="https://befiteveryday.netlify.app" /> | ||
<meta property="og:type" content="website" /> | ||
|
||
|
||
<meta name="twitter:card" content="summary_large_image" /> | ||
<meta name="twitter:title" content="FitFlex - Your Fitness Journey" /> | ||
<meta | ||
name="twitter:description" | ||
content="Access structured workout plans for weight loss and fitness with FitFlex." | ||
/> | ||
<meta name="twitter:image" content="https://befiteveryday.netlify.app/og-image.jpg" /> | ||
|
||
|
||
<meta name="robots" content="index, follow" /> | ||
|
||
<link rel="canonical" href="https://befiteveryday.netlify.app" /> | ||
</Helmet> | ||
); | ||
|
||
export default Metadata; |