From 453f9f4f2b00e9eeee786313c7f42ec6020edde6 Mon Sep 17 00:00:00 2001 From: JustineDevs Date: Sun, 23 Aug 2026 04:39:58 +0800 Subject: [PATCH 1/5] Make the documentation site discoverable Expose canonical metadata, structured software/site data, crawl policy, and a sitemap so search engines and answer engines can identify the official SDK documentation. Constraint: The docs site is the canonical public source for the SDK Rejected: Static public robots and sitemap files | generated routes stay aligned with Fumadocs content Confidence: high Scope-risk: narrow Directive: Keep canonical URLs and crawler policy aligned with the production docs domain Tested: pnpm check; pnpm --filter agent-compat-docs typecheck; pnpm --filter agent-compat-docs build Not-tested: Search Console or live crawler indexing after deployment --- apps/docs/app/docs/[[...slug]]/page.tsx | 12 ++++- apps/docs/app/layout.tsx | 62 +++++++++++++++++++++++++ apps/docs/app/robots.ts | 19 ++++++++ apps/docs/app/sitemap.ts | 11 +++++ 4 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 apps/docs/app/robots.ts create mode 100644 apps/docs/app/sitemap.ts diff --git a/apps/docs/app/docs/[[...slug]]/page.tsx b/apps/docs/app/docs/[[...slug]]/page.tsx index 1cbc6ee..aca6dc5 100644 --- a/apps/docs/app/docs/[[...slug]]/page.tsx +++ b/apps/docs/app/docs/[[...slug]]/page.tsx @@ -35,5 +35,15 @@ export async function generateMetadata(props: PageProps) { const params = await props.params; const page = source.getPage(params.slug); if (!page) return {}; - return { title: page.data.title, description: page.data.description }; + return { + title: page.data.title, + description: page.data.description, + alternates: { canonical: page.url }, + openGraph: { + type: "article", + url: page.url, + title: page.data.title, + description: page.data.description, + }, + }; } diff --git a/apps/docs/app/layout.tsx b/apps/docs/app/layout.tsx index 81f4ecd..0910a6c 100644 --- a/apps/docs/app/layout.tsx +++ b/apps/docs/app/layout.tsx @@ -11,6 +11,37 @@ export const metadata: Metadata = { }, description: "Cross-agent environment compatibility SDK: detect, compile, validate.", + applicationName: "Agent Compat", + keywords: [ + "agent compatibility", + "AI agent SDK", + "AGENTS.md", + "agent skills", + "TypeScript", + ], + authors: [{ name: "Justine Devs", url: "https://github.com/JustineDevs" }], + creator: "Justine Devs", + publisher: "Justine Devs", + alternates: { canonical: "/docs" }, + openGraph: { + type: "website", + siteName: "Agent Compat", + title: "Agent Compat | Cross-agent compatibility SDK", + description: + "Detect, compile, and validate project integrations across AI coding environments.", + url: "/docs", + }, + twitter: { + card: "summary", + title: "Agent Compat | Cross-agent compatibility SDK", + description: + "Detect, compile, and validate project integrations across AI coding environments.", + }, + robots: { + index: true, + follow: true, + googleBot: { index: true, follow: true, "max-image-preview": "large" }, + }, }; export default function RootLayout({ @@ -21,6 +52,37 @@ export default function RootLayout({ return ( +