forked from Talenttrust/Talenttrust-Frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsitemap.ts
More file actions
31 lines (29 loc) · 630 Bytes
/
Copy pathsitemap.ts
File metadata and controls
31 lines (29 loc) · 630 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import type { MetadataRoute } from 'next';
/**
* Generates a dynamic sitemap.xml listing all public static routes.
*
* @returns Sitemap entries with lastModified date
*/
export default function sitemap(): MetadataRoute.Sitemap {
const siteUrl =
process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3000';
const lastModified = new Date();
return [
{
url: siteUrl,
lastModified,
},
{
url: `${siteUrl}/contracts`,
lastModified,
},
{
url: `${siteUrl}/milestones`,
lastModified,
},
{
url: `${siteUrl}/reputation`,
lastModified,
},
];
}