feat: add full SEO (generateMetadata, OG, Twitter Card, JSON-LD, sitemap, robots, llms.txt)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { MetadataRoute } from 'next';
|
||||
import { prisma } from '@/lib/db';
|
||||
|
||||
export default async function robots(): Promise<MetadataRoute.Robots> {
|
||||
const settings = await prisma.siteSettings.findFirst();
|
||||
const siteUrl = settings?.siteUrl || 'https://moybeach.com';
|
||||
|
||||
return {
|
||||
rules: [
|
||||
{
|
||||
userAgent: '*',
|
||||
allow: '/',
|
||||
disallow: ['/admin/', '/api/'],
|
||||
},
|
||||
],
|
||||
sitemap: `${siteUrl}/sitemap.xml`,
|
||||
host: siteUrl,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user