mirror of
https://github.com/vercel/commerce.git
synced 2025-05-15 05:56:59 +00:00
15 lines
427 B
TypeScript
15 lines
427 B
TypeScript
import { MetadataRoute } from 'next';
|
|
|
|
const baseUrl = process.env.NEXT_PUBLIC_VERCEL_URL
|
|
? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`
|
|
: 'http://localhost:3000';
|
|
|
|
export default async function sitemap(): Promise<Promise<Promise<MetadataRoute.Sitemap>>> {
|
|
const routesMap = ['', '/search'].map((route) => ({
|
|
url: `${baseUrl}${route}`,
|
|
lastModified: new Date().toISOString()
|
|
}));
|
|
|
|
return [...routesMap];
|
|
}
|