mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
25 lines
523 B
TypeScript
25 lines
523 B
TypeScript
import { MetadataRoute } from 'next'
|
|
|
|
export async function generateSitemaps() {
|
|
return [
|
|
{ id: 'child0' },
|
|
{ id: 'child1' },
|
|
{ id: 'child2' },
|
|
{ id: 'child3' },
|
|
]
|
|
}
|
|
|
|
export default async function sitemap({ id }): Promise<MetadataRoute.Sitemap> {
|
|
const sitemapId = await id
|
|
return [
|
|
{
|
|
url: `https://example.com/dynamic/${sitemapId}`,
|
|
lastModified: '2021-01-01',
|
|
},
|
|
{
|
|
url: `https://example.com/dynamic/${sitemapId}/about`,
|
|
lastModified: '2021-01-01',
|
|
},
|
|
]
|
|
}
|