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, }));