From 30d6653167f74ef8addc4bdb10349b214341cd5e Mon Sep 17 00:00:00 2001 From: Sh Raj Date: Fri, 22 Mar 2024 13:45:56 +0000 Subject: [PATCH] sitemap limit increased --- src/app/sitemap2/[id]/route.js | 4 ++-- src/app/sitemap2/route.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/sitemap2/[id]/route.js b/src/app/sitemap2/[id]/route.js index 4c6a0d4..e5f4402 100644 --- a/src/app/sitemap2/[id]/route.js +++ b/src/app/sitemap2/[id]/route.js @@ -15,7 +15,7 @@ console.log(randomNumber); let getArticlesFromDevTo = async (params) => { console.log(params); const response = await fetch( - `https://dev.to/api/articles/latest/?per_page=1000&page=${randomNumber}` + `https://dev.to/api/articles/latest/?per_page=100000&page=${randomNumber}` ); const data = await response.json(); return data; @@ -34,7 +34,7 @@ export async function GET(req) { // Add each article URL to the sitemap articles.forEach((article) => { xml += ''; - xml += `https://dev-art.vercel.app${article.path}`; // Modify URL structure as needed + 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 diff --git a/src/app/sitemap2/route.js b/src/app/sitemap2/route.js index d29137b..5dd3240 100644 --- a/src/app/sitemap2/route.js +++ b/src/app/sitemap2/route.js @@ -3,7 +3,7 @@ import { NextResponse } from "next/server"; // Mock function to fetch articles (replace this with your actual implementation) let getArticlesFromDevTo = async () => { const response = await fetch( - `https://dev.to/api/articles/latest/?per_page=100&page=1` + `https://dev.to/api/articles/latest/?per_page=100000&page=1` ); const data = await response.json(); return data;