37 lines
684 B
TypeScript
37 lines
684 B
TypeScript
/**
|
|
* Robots.txt Generator
|
|
*
|
|
* Generates robots.txt for SEO.
|
|
* Next.js will automatically serve this at /robots.txt
|
|
*/
|
|
|
|
import type { MetadataRoute } from 'next'
|
|
|
|
export default function robots(): MetadataRoute.Robots {
|
|
const baseUrl = process.env.NEXT_PUBLIC_APP_URL || 'https://aispeedrun.vercel.app'
|
|
|
|
return {
|
|
rules: [
|
|
{
|
|
userAgent: '*',
|
|
allow: '/',
|
|
disallow: [
|
|
'/api/',
|
|
'/_next/',
|
|
'/admin/',
|
|
],
|
|
},
|
|
{
|
|
userAgent: 'Googlebot',
|
|
allow: '/',
|
|
disallow: [
|
|
'/api/',
|
|
'/_next/',
|
|
],
|
|
},
|
|
],
|
|
sitemap: `${baseUrl}/sitemap.xml`,
|
|
}
|
|
}
|
|
|