From f0e2c27c8978e1517efe008e36a34bbf15d90b03 Mon Sep 17 00:00:00 2001 From: Sh Raj Date: Fri, 22 Mar 2024 14:24:59 +0000 Subject: [PATCH] lowering sitemap capacity --- src/app/sitemap2/[id]/route.js | 196 ++++++++++++++++----------------- 1 file changed, 98 insertions(+), 98 deletions(-) diff --git a/src/app/sitemap2/[id]/route.js b/src/app/sitemap2/[id]/route.js index 864a766..9176329 100644 --- a/src/app/sitemap2/[id]/route.js +++ b/src/app/sitemap2/[id]/route.js @@ -31,24 +31,24 @@ export async function GET(req) { let articles2 = await getArticlesFromDevTo(328); let articles3 = await getArticlesFromDevTo(39); let articles4 = await getArticlesFromDevTo(342); - let articles5 = await getArticlesFromDevTo(35); - let articles6 = await getArticlesFromDevTo(122); - let articles7 = await getArticlesFromDevTo(11); - let articles8 = await getArticlesFromDevTo(312); - let articles9 = await getArticlesFromDevTo(31); - let articles10 = await getArticlesFromDevTo(21); - let articles11 = await getArticlesFromDevTo(); - let articles12 = await getArticlesFromDevTo(2); - let articles13 = await getArticlesFromDevTo(); - let articles14 = await getArticlesFromDevTo(2); - let articles15 = await getArticlesFromDevTo(); - let articles16 = await getArticlesFromDevTo(2); - let articles17 = await getArticlesFromDevTo(); - let articles18 = await getArticlesFromDevTo(2); - let articles19 = await getArticlesFromDevTo(); - let articles20 = await getArticlesFromDevTo(2); - let articles21 = await getArticlesFromDevTo(); - let articles22 = await getArticlesFromDevTo(2); + // let articles5 = await getArticlesFromDevTo(35); + // let articles6 = await getArticlesFromDevTo(122); + // let articles7 = await getArticlesFromDevTo(11); + // let articles8 = await getArticlesFromDevTo(312); + // let articles9 = await getArticlesFromDevTo(31); + // let articles10 = await getArticlesFromDevTo(21); + // let articles11 = await getArticlesFromDevTo(); + // let articles12 = await getArticlesFromDevTo(2); + // let articles13 = await getArticlesFromDevTo(); + // let articles14 = await getArticlesFromDevTo(2); + // let articles15 = await getArticlesFromDevTo(); + // let articles16 = await getArticlesFromDevTo(2); + // let articles17 = await getArticlesFromDevTo(); + // let articles18 = await getArticlesFromDevTo(2); + // let articles19 = await getArticlesFromDevTo(); + // let articles20 = await getArticlesFromDevTo(2); + // let articles21 = await getArticlesFromDevTo(); + // let articles22 = await getArticlesFromDevTo(2); // Start building the XML let xml = ''; @@ -95,89 +95,89 @@ export async function GET(req) { xml += "0.8"; // Priority can be adjusted based on the importance of the page xml += ""; }); - articles5.forEach((article) => { - xml += ""; - xml += `https://dev.sh20raj.com${article.path}`; // Modify URL structure as needed - xml += `${new Date( - article.published_at - ).toISOString()}`; // Use published date as last modified - xml += "weekly"; // You can adjust the change frequency - xml += "0.8"; // Priority can be adjusted based on the importance of the page - xml += ""; - }); - articles6.forEach((article) => { - xml += ""; - xml += `https://dev.sh20raj.com${article.path}`; // Modify URL structure as needed - xml += `${new Date( - article.published_at - ).toISOString()}`; // Use published date as last modified - xml += "weekly"; // You can adjust the change frequency - xml += "0.8"; // Priority can be adjusted based on the importance of the page - xml += ""; - }); - articles7.forEach((article) => { - xml += ""; - xml += `https://dev.sh20raj.com${article.path}`; // Modify URL structure as needed - xml += `${new Date( - article.published_at - ).toISOString()}`; // Use published date as last modified - xml += "weekly"; // You can adjust the change frequency - xml += "0.8"; // Priority can be adjusted based on the importance of the page - xml += ""; - }); - articles8.forEach((article) => { - xml += ""; - xml += `https://dev.sh20raj.com${article.path}`; // Modify URL structure as needed - xml += `${new Date( - article.published_at - ).toISOString()}`; // Use published date as last modified - xml += "weekly"; // You can adjust the change frequency - xml += "0.8"; // Priority can be adjusted based on the importance of the page - xml += ""; - }); - (await getArticlesFromDevTo(24)).forEach((article) => { - xml += ""; - xml += `https://dev.sh20raj.com${article.path}`; // Modify URL structure as needed - xml += `${new Date( - article.published_at - ).toISOString()}`; // Use published date as last modified - xml += "weekly"; // You can adjust the change frequency - xml += "0.8"; // Priority can be adjusted based on the importance of the page - xml += ""; - }); + // articles5.forEach((article) => { + // xml += ""; + // xml += `https://dev.sh20raj.com${article.path}`; // Modify URL structure as needed + // xml += `${new Date( + // article.published_at + // ).toISOString()}`; // Use published date as last modified + // xml += "weekly"; // You can adjust the change frequency + // xml += "0.8"; // Priority can be adjusted based on the importance of the page + // xml += ""; + // }); + // articles6.forEach((article) => { + // xml += ""; + // xml += `https://dev.sh20raj.com${article.path}`; // Modify URL structure as needed + // xml += `${new Date( + // article.published_at + // ).toISOString()}`; // Use published date as last modified + // xml += "weekly"; // You can adjust the change frequency + // xml += "0.8"; // Priority can be adjusted based on the importance of the page + // xml += ""; + // }); + // articles7.forEach((article) => { + // xml += ""; + // xml += `https://dev.sh20raj.com${article.path}`; // Modify URL structure as needed + // xml += `${new Date( + // article.published_at + // ).toISOString()}`; // Use published date as last modified + // xml += "weekly"; // You can adjust the change frequency + // xml += "0.8"; // Priority can be adjusted based on the importance of the page + // xml += ""; + // }); + // articles8.forEach((article) => { + // xml += ""; + // xml += `https://dev.sh20raj.com${article.path}`; // Modify URL structure as needed + // xml += `${new Date( + // article.published_at + // ).toISOString()}`; // Use published date as last modified + // xml += "weekly"; // You can adjust the change frequency + // xml += "0.8"; // Priority can be adjusted based on the importance of the page + // xml += ""; + // }); + // (await getArticlesFromDevTo(24)).forEach((article) => { + // xml += ""; + // xml += `https://dev.sh20raj.com${article.path}`; // Modify URL structure as needed + // xml += `${new Date( + // article.published_at + // ).toISOString()}`; // Use published date as last modified + // xml += "weekly"; // You can adjust the change frequency + // xml += "0.8"; // Priority can be adjusted based on the importance of the page + // xml += ""; + // }); - (await getArticlesFromDevTo(32)).forEach((article) => { - xml += ""; - xml += `https://dev.sh20raj.com${article.path}`; // Modify URL structure as needed - xml += `${new Date( - article.published_at - ).toISOString()}`; // Use published date as last modified - xml += "weekly"; // You can adjust the change frequency - xml += "0.8"; // Priority can be adjusted based on the importance of the page - xml += ""; - }); + // (await getArticlesFromDevTo(32)).forEach((article) => { + // xml += ""; + // xml += `https://dev.sh20raj.com${article.path}`; // Modify URL structure as needed + // xml += `${new Date( + // article.published_at + // ).toISOString()}`; // Use published date as last modified + // xml += "weekly"; // You can adjust the change frequency + // xml += "0.8"; // Priority can be adjusted based on the importance of the page + // xml += ""; + // }); - (await getArticlesFromDevTo(23)).forEach((article) => { - xml += ""; - xml += `https://dev.sh20raj.com${article.path}`; // Modify URL structure as needed - xml += `${new Date( - article.published_at - ).toISOString()}`; // Use published date as last modified - xml += "weekly"; // You can adjust the change frequency - xml += "0.8"; // Priority can be adjusted based on the importance of the page - xml += ""; - }); + // (await getArticlesFromDevTo(23)).forEach((article) => { + // xml += ""; + // xml += `https://dev.sh20raj.com${article.path}`; // Modify URL structure as needed + // xml += `${new Date( + // article.published_at + // ).toISOString()}`; // Use published date as last modified + // xml += "weekly"; // You can adjust the change frequency + // xml += "0.8"; // Priority can be adjusted based on the importance of the page + // xml += ""; + // }); - (await getArticlesFromDevTo(324)).forEach((article) => { - xml += ""; - xml += `https://dev.sh20raj.com${article.path}`; // Modify URL structure as needed - xml += `${new Date( - article.published_at - ).toISOString()}`; // Use published date as last modified - xml += "weekly"; // You can adjust the change frequency - xml += "0.8"; // Priority can be adjusted based on the importance of the page - xml += ""; - }); + // (await getArticlesFromDevTo(324)).forEach((article) => { + // xml += ""; + // xml += `https://dev.sh20raj.com${article.path}`; // Modify URL structure as needed + // xml += `${new Date( + // article.published_at + // ).toISOString()}`; // Use published date as last modified + // xml += "weekly"; // You can adjust the change frequency + // xml += "0.8"; // Priority can be adjusted based on the importance of the page + // xml += ""; + // });