Some checks failed
Deploy to Production / deploy (push) Failing after 46s
Ported and adapted from the BuildMyDiscord SEO setup: - lib/seo.ts — single source for site constants, the FAQ data (shared by the rendered FAQ and the FAQPage schema so they never drift) and JSON-LD builders. - Rich root metadata: title template, keywords, Open Graph, Twitter card, robots directives, canonical. - JSON-LD: Organization + WebSite + SoftwareApplication sitewide, FAQPage on the landing page. No AggregateRating — there are no real reviews yet. - app/robots.ts — allow all, explicit allow-list for AI answer-engine crawlers (GPTBot, ClaudeBot, PerplexityBot, …), disallow private routes. - app/sitemap.ts — every public marketing + docs route. - app/opengraph-image.tsx — monochrome on-brand 1200x630 share card. - app/manifest.ts + public/llms.txt. - Per-page metadata for pricing, changelog, security, privacy, terms, docs, templates and status. - opengraph-image + apple-icon pinned to the edge runtime — next/og crashes during a Node-runtime prerender. Verified: next build passes; /robots.txt, /sitemap.xml, /manifest.webmanifest and /opengraph-image all generate. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
37 lines
1.5 KiB
TypeScript
37 lines
1.5 KiB
TypeScript
import { SITE_URL } from '@/lib/seo';
|
|
import type { MetadataRoute } from 'next';
|
|
|
|
type Entry = {
|
|
path: string;
|
|
priority: number;
|
|
changeFrequency: MetadataRoute.Sitemap[number]['changeFrequency'];
|
|
};
|
|
|
|
const ROUTES: Entry[] = [
|
|
{ path: '/', priority: 1.0, changeFrequency: 'weekly' },
|
|
{ path: '/pricing', priority: 0.9, changeFrequency: 'weekly' },
|
|
{ path: '/templates', priority: 0.9, changeFrequency: 'daily' },
|
|
{ path: '/docs', priority: 0.8, changeFrequency: 'weekly' },
|
|
{ path: '/docs/concepts', priority: 0.7, changeFrequency: 'monthly' },
|
|
{ path: '/docs/oauth', priority: 0.7, changeFrequency: 'monthly' },
|
|
{ path: '/docs/authoring', priority: 0.7, changeFrequency: 'monthly' },
|
|
{ path: '/docs/api-reference', priority: 0.7, changeFrequency: 'monthly' },
|
|
{ path: '/docs/self-hosting', priority: 0.7, changeFrequency: 'monthly' },
|
|
{ path: '/docs/faq', priority: 0.6, changeFrequency: 'monthly' },
|
|
{ path: '/changelog', priority: 0.6, changeFrequency: 'weekly' },
|
|
{ path: '/security', priority: 0.5, changeFrequency: 'monthly' },
|
|
{ path: '/status', priority: 0.4, changeFrequency: 'weekly' },
|
|
{ path: '/privacy', priority: 0.3, changeFrequency: 'yearly' },
|
|
{ path: '/terms', priority: 0.3, changeFrequency: 'yearly' },
|
|
];
|
|
|
|
export default function sitemap(): MetadataRoute.Sitemap {
|
|
const now = new Date();
|
|
return ROUTES.map((r) => ({
|
|
url: `${SITE_URL}${r.path}`,
|
|
lastModified: now,
|
|
changeFrequency: r.changeFrequency,
|
|
priority: r.priority,
|
|
}));
|
|
}
|