|
1 | | -import type { MetadataRoute } from "next"; |
2 | | -import { getAllRFSData } from "@/app/agents/utils/get-rfs-data"; |
3 | | -import { PATHS } from "@/constants/paths"; |
4 | | -import { BASE_URL } from "@/constants/site-metadata"; |
| 1 | +import type { MetadataRoute } from 'next' |
| 2 | + |
| 3 | +import { getAllRFSData } from '@/app/agents/utils/get-rfs-data' |
| 4 | +import { PATHS } from '@/constants/paths' |
| 5 | +import { BASE_URL } from '@/constants/site-metadata' |
5 | 6 |
|
6 | 7 | export default async function sitemap(): Promise<MetadataRoute.Sitemap> { |
7 | | - const lastModified = new Date(); |
| 8 | + const lastModified = new Date() |
8 | 9 |
|
9 | 10 | const staticRoutes = Object.values(PATHS).map(({ path }) => ({ |
10 | 11 | url: `${BASE_URL}${path}`, |
11 | 12 | lastModified, |
12 | | - changeFrequency: "weekly" as const, |
13 | | - priority: path === "/" ? 1 : 0.8, |
14 | | - })); |
| 13 | + changeFrequency: 'weekly' as const, |
| 14 | + priority: path === '/' ? 1 : 0.8, |
| 15 | + })) |
15 | 16 |
|
16 | | - const allRFSData = await getAllRFSData(); |
| 17 | + const allRFSData = await getAllRFSData() |
17 | 18 | const agentRoutes = allRFSData.map(({ slug }) => ({ |
18 | 19 | url: `${BASE_URL}${PATHS.AGENTS.path}/${slug}`, |
19 | 20 | lastModified, |
20 | | - changeFrequency: "weekly" as const, |
| 21 | + changeFrequency: 'weekly' as const, |
21 | 22 | priority: 0.7, |
22 | | - })); |
| 23 | + })) |
23 | 24 |
|
24 | | - return [...staticRoutes, ...agentRoutes]; |
| 25 | + return [...staticRoutes, ...agentRoutes] |
25 | 26 | } |
0 commit comments