mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-09-01 05:29:22 +00:00
fix(website): generate sitemap only in build output
This commit is contained in:
@@ -3,7 +3,7 @@ const path = require('path');
|
||||
const https = require('https');
|
||||
|
||||
const websiteDir = __dirname;
|
||||
const sitemapPath = path.join(websiteDir, 'sitemap.xml');
|
||||
const sitemapPath = path.join(websiteDir, 'www', 'sitemap.xml');
|
||||
|
||||
// 1. Find the IndexNow key file in the website directory
|
||||
const files = fs.readdirSync(websiteDir);
|
||||
@@ -34,7 +34,7 @@ console.log(`Key Location: ${keyLocation}`);
|
||||
|
||||
// 2. Parse URLs from sitemap.xml
|
||||
if (!fs.existsSync(sitemapPath)) {
|
||||
console.error(`Error: sitemap.xml not found at ${sitemapPath}`);
|
||||
console.error(`Error: generated sitemap.xml not found at ${sitemapPath}. Run \`node website/build.cjs\` first.`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user