-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsitemap.ts
More file actions
22 lines (17 loc) · 754 Bytes
/
Copy pathsitemap.ts
File metadata and controls
22 lines (17 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import type { MetadataRoute } from 'next';
import { routing } from '../i18n/routing';
export const dynamic = 'force-static';
export default function sitemap(): MetadataRoute.Sitemap {
/**
* INSTRUCTIONS FOR PRODUCTION DOMAIN:
* 1. Define the `NEXT_PUBLIC_SITE_URL` environment variable in your hosting environment (e.g. Vercel, Docker).
* 2. Replace the fallback domain 'https://TODO:project.aossie.org' below with your project's target production domain.
*/
const rawBaseUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://TODO:project.aossie.org';
const baseUrl = rawBaseUrl.replace(/\/$/, '');
return routing.locales.map((locale) => ({
url: `${baseUrl}/${locale}`,
changeFrequency: 'monthly',
priority: 1,
}));
}