diff --git a/src/app/sitemap.ts b/src/app/sitemap.ts index 46504c4..532f69c 100644 --- a/src/app/sitemap.ts +++ b/src/app/sitemap.ts @@ -2,6 +2,9 @@ import type { MetadataRoute } from 'next' import { fetchCollection } from '@/lib/api-client' import type { WorkFromServer, NewsFromServer, CategoryFromServer } from '@/types/types' +export const dynamic = 'force-dynamic' +export const revalidate = 3600 + export default async function sitemap(): Promise { const siteUrl = process.env.SITE_URL || process.env.NEXT_PUBLIC_SITE_URL || '' @@ -22,10 +25,10 @@ export default async function sitemap(): Promise { try { const [works, news, categories, inStock] = await Promise.all([ - fetchCollection('works'), - fetchCollection('news'), - fetchCollection('category'), - fetchCollection('works', { filter: { in_stock: true } }), + fetchCollection('works', { cache: 'no-store' }), + fetchCollection('news', { cache: 'no-store' }), + fetchCollection('category', { cache: 'no-store' }), + fetchCollection('works', { filter: { in_stock: true }, cache: 'no-store' }), ]) if (Array.isArray(works)) {