feat: Add SEO/AEO/Geo improvements

- Add ai.txt and llms.txt endpoints for AI/LLM discoverability
- Enhance metadata across all pages (canonical URLs, OpenGraph, Twitter)
- Add structured data (JSON-LD) to blog index, tag pages
- Update robots.txt with AI crawler rules
- Improve BlogPosting and CollectionPage schemas
This commit is contained in:
2026-03-14 12:19:18 +08:00
parent 08117a11c5
commit efb57b691b
11 changed files with 430 additions and 25 deletions

View File

@@ -4,11 +4,19 @@ export default function robots(): MetadataRoute.Robots {
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3000';
return {
rules: {
userAgent: '*',
allow: '/',
disallow: ['/api/', '/_next/', '/admin/'],
},
rules: [
{
userAgent: '*',
allow: '/',
disallow: ['/api/', '/_next/', '/admin/'],
},
{
userAgent: ['GPTBot', 'ChatGPT-User', 'Google-Extended', 'Anthropic-ai', 'ClaudeBot', 'Claude-Web', 'PerplexityBot', 'Cohere-ai'],
allow: '/',
disallow: ['/api/', '/_next/', '/admin/'],
},
],
sitemap: `${siteUrl}/sitemap.xml`,
host: siteUrl,
};
}