From cc769da26c94cc1751001f71e5ab558e61613712 Mon Sep 17 00:00:00 2001 From: Neeraj Rekwar <88387699+neerajrekwar@users.noreply.github.com> Date: Fri, 20 Dec 2024 14:18:52 +0000 Subject: [PATCH] fdas --- app/sitemap.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/sitemap.ts b/app/sitemap.ts index 150cd172e..e332244c9 100644 --- a/app/sitemap.ts +++ b/app/sitemap.ts @@ -2,38 +2,38 @@ import { MetadataRoute } from 'next'; import posts from '@/app/blog/data/posts.json'; // Example JSON data file with dynamic routes export default function sitemap(): MetadataRoute.Sitemap { - const staticRoutes = [ + const staticRoutes: MetadataRoute.Sitemap = [ { url: 'https://neerajrekwar.github.io', lastModified: new Date(), - changeFrequency: 'monthly', + changeFrequency: 'yearly', // Typed correctly priority: 1, }, { url: 'https://neerajrekwar.github.io/about', lastModified: new Date(), - changeFrequency: 'monthly', + changeFrequency: 'monthly', // Typed correctly priority: 0.8, }, { url: 'https://neerajrekwar.github.io/blog', lastModified: new Date(), - changeFrequency: 'weekly', + changeFrequency: 'weekly', // Typed correctly priority: 0.5, }, { url: 'https://neerajrekwar.github.io/contact', lastModified: new Date(), - changeFrequency: 'weekly', + changeFrequency: 'weekly', // Typed correctly priority: 0.5, }, ]; // Generate dynamic routes for blog posts - const dynamicRoutes = posts.map(post => ({ + const dynamicRoutes: MetadataRoute.Sitemap = posts.map(post => ({ url: `https://neerajrekwar.github.io/blog/${post.slug}`, lastModified: post.date ? new Date(post.date) : new Date(), - changeFrequency: 'weekly', + changeFrequency: 'weekly', // Typed correctly priority: 0.7, }));