import type { MetadataRoute } from 'next'; import { SITE_URL } from '@/lib/site'; import { SITEMAP_IDS } from './sitemap'; export default function robots(): MetadataRoute.Robots { return { rules: [ { userAgent: '*', allow: '/', // Admin, raw API and the parameterised analytical views (their bare paths are indexed via the sitemap). disallow: ['/admin', '/api/v1/', '/explore?', '/scatter?', '/trajectories?', '/finder?', '/compare/og'], }, ], sitemap: SITEMAP_IDS.map((id) => `${SITE_URL}/sitemap/${id}.xml`), host: SITE_URL, }; }