Some checks failed
Build and Deploy Next.js Blog to Production / 🔍 Code Quality Checks (push) Failing after 18s
Build and Deploy Next.js Blog to Production / 🏗️ Build and Push Docker Image (push) Has been skipped
Build and Deploy Next.js Blog to Production / 🚀 Deploy to Production (push) Has been skipped
19 lines
474 B
TypeScript
19 lines
474 B
TypeScript
import { MetadataRoute } from 'next'
|
|
|
|
export default function robots(): MetadataRoute.Robots {
|
|
const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3030'
|
|
|
|
return {
|
|
rules: {
|
|
userAgent: '*',
|
|
allow: '/',
|
|
disallow: [
|
|
'/api/', // Disallow API routes (if any)
|
|
'/_next/', // Disallow Next.js internals
|
|
'/admin/', // Disallow admin (if any)
|
|
],
|
|
},
|
|
sitemap: `${baseUrl}/sitemap.xml`,
|
|
}
|
|
}
|