sitemap.ts42 lines · main
| 1 | import type { MetadataRoute } from 'next'; |
| 2 | |
| 3 | const SITE = 'https://briven.tech'; |
| 4 | |
| 5 | /** |
| 6 | * Marketing-site sitemap. Dashboard routes are gated behind auth and |
| 7 | * intentionally excluded — they shouldn't be indexed. |
| 8 | */ |
| 9 | const MIGRATE_SOURCES = [ |
| 10 | 'convex', |
| 11 | 'supabase', |
| 12 | 'firebase', |
| 13 | 'mongodb', |
| 14 | 'drizzle', |
| 15 | 'prisma', |
| 16 | 'postgres', |
| 17 | 'hasura', |
| 18 | 'nextauth', |
| 19 | ] as const; |
| 20 | |
| 21 | const PATHS: readonly string[] = [ |
| 22 | '/', |
| 23 | '/pricing', |
| 24 | '/compare', |
| 25 | '/migrate', |
| 26 | ...MIGRATE_SOURCES.map((s) => `/migrate/${s}`), |
| 27 | '/signin', |
| 28 | '/privacy', |
| 29 | '/terms', |
| 30 | '/subprocessors', |
| 31 | '/trust', |
| 32 | ]; |
| 33 | |
| 34 | export default function sitemap(): MetadataRoute.Sitemap { |
| 35 | const lastModified = new Date(); |
| 36 | return PATHS.map((p) => ({ |
| 37 | url: `${SITE}${p}`, |
| 38 | lastModified, |
| 39 | changeFrequency: p === '/' ? ('weekly' as const) : ('monthly' as const), |
| 40 | priority: p === '/' ? 1 : 0.5, |
| 41 | })); |
| 42 | } |