Add robots.txt file + update Next version. (#984)

This commit is contained in:
Lee Robinson
2023-04-24 10:53:56 -04:00
committed by GitHub
parent 7cdecd322b
commit c2b96d6e2f
3 changed files with 58 additions and 43 deletions

15
app/robots.ts Normal file
View File

@@ -0,0 +1,15 @@
const baseUrl = process.env.NEXT_PUBLIC_VERCEL_URL
? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`
: 'http://localhost:3000';
export default function robots() {
return {
rules: [
{
userAgent: '*'
}
],
sitemap: `${baseUrl}/sitemap.xml`,
host: baseUrl
};
}