diff --git a/generate-sitemap.js b/generate-sitemap.js new file mode 100644 index 0000000..1aa3213 --- /dev/null +++ b/generate-sitemap.js @@ -0,0 +1,43 @@ +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); + +// Define the pages you want to include in the sitemap +const pages = [ + { url: '/', changefreq: 'daily', priority: 1.0 }, + { url: '/sign-in', changefreq: 'monthly', priority: 0.8 }, + { url: '/sign-up', changefreq: 'monthly', priority: 0.8 }, + { url: '/manager', changefreq: 'monthly', priority: 0.9 }, + { url: '/issues', changefreq: 'weekly', priority: 0.6 }, // GitHub issues page + { url: '/pulls', changefreq: 'weekly', priority: 0.6 }, // GitHub pull requests page + { url: '/#readme', changefreq: 'monthly', priority: 0.7 }, // README section + // Add more URLs as needed +]; + +async function generateSitemap() { + // Create a write stream to save the sitemap.xml file + const writeStream = createWriteStream(path.resolve(__dirname, 'public', 'sitemap.xml')); + + // Create a new SitemapStream with your website's hostname + const sitemap = new SitemapStream({ hostname: 'https://github.com/jinx-vi-0/passop' }); + + // Pipe the sitemap to the write stream and log success message on finish + sitemap.pipe(writeStream).on('finish', () => { + console.log('Sitemap generated successfully'); + }); + + // Write each page to the sitemap + pages.forEach(page => sitemap.write(page)); + + // End the sitemap stream + sitemap.end(); +} + +// Execute the generateSitemap function and catch any errors +generateSitemap().catch(error => { + console.error('Error generating sitemap:', error); +}); \ No newline at end of file diff --git a/index.html b/index.html index 0b69c2a..d3bb1ae 100755 --- a/index.html +++ b/index.html @@ -4,10 +4,25 @@ - PassOP - Your own password manager + PassOP - Your Secure Password Manager + + + + + + + + + + + + +
+ + diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..ca91653 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Disallow: /private/ +Allow: / +Sitemap: https://github.com/jinx-vi-0/passop/sitemap.xml \ No newline at end of file diff --git a/public/sitemap.xml b/public/sitemap.xml new file mode 100644 index 0000000..6b4be5d --- /dev/null +++ b/public/sitemap.xml @@ -0,0 +1,28 @@ + + + + https://github.com/jinx-vi-0/passop + 2024-11-08 + monthly + 1.0 + + + https://github.com/jinx-vi-0/passop#readme + 2024-11-08 + monthly + 0.8 + + + https://github.com/jinx-vi-0/passop/issues + 2024-11-08 + weekly + 0.6 + + + https://github.com/jinx-vi-0/passop/pulls + 2024-11-08 + weekly + 0.6 + + + \ No newline at end of file diff --git a/src/App.jsx b/src/App.jsx index 018dd1f..14deb68 100755 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,3 +1,4 @@ + import { BrowserRouter as Router, Route, Routes, Navigate } from 'react-router-dom'; import { useState } from 'react'; import './App.css'; @@ -6,10 +7,12 @@ import Manager from './components/Manager'; import Footer from './components/Footer'; import SignIn from './components/SignIn'; import SignUp from './components/SignUp'; +import Metadata from './metadata'; // Import the Metadata component function App() { return ( + {/* Add Metadata component here */}
@@ -25,6 +28,4 @@ function App() { ); } - - -export default App; +export default App; \ No newline at end of file diff --git a/src/metadata.jsx b/src/metadata.jsx new file mode 100644 index 0000000..8e06498 --- /dev/null +++ b/src/metadata.jsx @@ -0,0 +1,40 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; + +const Metadata = () => { + return ( + + PassOP - Your Secure Password Manager + + + + + + + + {/* Open Graph Tags */} + + + + + + + + + {/* Twitter Card Tags */} + + + + + + + + {/* Theme and Application Metadata */} + + + + + ); +}; + +export default Metadata; \ No newline at end of file