Skip to content

Commit

Permalink
Fixed the sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyaspranav committed Oct 27, 2024
1 parent 004b70f commit 44e6c35
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 24 deletions.
35 changes: 34 additions & 1 deletion docs/.vitepress/config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import fs from 'fs';
import path from 'path';

export default {
base: '/XenodeDevDocs/',

Expand All @@ -24,5 +27,35 @@ export default {
name: 'google-site-verification',
content: 'rk5w0mlpKvSpex5z5XJ4lhOn2nVFHLZPso7G8XzMh5M'
}]
]
],

buildEnd() {
// Define the sitemap content
const sitemapContent = `<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap-image/1.1">
<url>
<loc>https://xenodestudio.github.io/XenodeDevDocs/</loc>
<lastmod>${new Date().toISOString()}</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://xenodestudio.github.io/contributing</loc>
<lastmod>${new Date().toISOString()}</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://xenodestudio.github.io/code_of_conduct</loc>
<lastmod>${new Date().toISOString()}</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
</urlset>`;

// Write the sitemap to the dist directory
fs.writeFileSync(path.resolve(__dirname, 'dist/sitemap.xml'), sitemapContent);
}
}
23 changes: 0 additions & 23 deletions docs/sitemap.xml

This file was deleted.

0 comments on commit 44e6c35

Please sign in to comment.