mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-03-28 11:13:16 +00:00
fix: revalidate sitemap every 12 hours
This commit is contained in:
parent
5528c80516
commit
4656b969d6
1 changed files with 3 additions and 1 deletions
|
|
@ -3,6 +3,8 @@ import type { MetadataRoute } from "next";
|
|||
|
||||
type SitemapRoute = MetadataRoute.Sitemap[0];
|
||||
|
||||
export const revalidate = 43200; // update every 12 hours
|
||||
|
||||
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
|
||||
const baseUrl = process.env.NEXT_PUBLIC_BASE_URL;
|
||||
if (!baseUrl) {
|
||||
|
|
@ -41,7 +43,7 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
|
|||
url: `${baseUrl}/profile/${user.id}`,
|
||||
lastModified: user.updatedAt,
|
||||
changeFrequency: "weekly",
|
||||
priority: 0.3,
|
||||
priority: 0.2,
|
||||
} as SitemapRoute)
|
||||
),
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in a new issue