Skip to content

Commit

Permalink
Merge pull request #171 from mobeigi/add-sitemap-isr
Browse files Browse the repository at this point in the history
Resolves #170: Add 1hr revalidation time to sitemap
  • Loading branch information
mobeigi authored Oct 9, 2024
2 parents c6fe245 + 99d704e commit 37c12ca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/src/app/sitemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import config from '@payload-config';
import { resolveCategoryUrl } from '@/payload/collections/Category/resolveUrl';
import { resolvePostsUrl } from '@/payload/collections/Posts/resolveUrl';

export const revalidate = 3600;

const sitemap = async (): Promise<MetadataRoute.Sitemap> => {
const payload = await getPayloadHMR({
config,
Expand Down

0 comments on commit 37c12ca

Please sign in to comment.