buildmymcpserver/apps/web/app/layout.tsx
Marco Sadjadi cba45402ce fix(seo): canonical self-deindexing on /docs/*, truthful llms.txt, real sitemap dates, RSS feed, breadcrumbs, per-article OG images
- /docs subpages canonicalized to /docs and had no descriptions; each now
  uses pageMetadata with its own path (was: Google could index at most one)
- llms.txt claimed Team EUR 149, RBAC/SLA and BYO-cloud that do not exist;
  regenerated from lib/seo.ts truth + new llms-full.txt with docs content
- sitemap stamped lastModified=now on every request; now real per-route dates
  from new lib/articles.ts registry (single source for guides index/sitemap/RSS)
- new /feed.xml RSS 2.0 route + alternates link in root layout
- articleJsonLd: image (per-guide opengraph-image via lib/og-article.tsx),
  Person author, wordCount; new breadcrumbJsonLd on guides + docs
- GSC verification via NEXT_PUBLIC_GSC_VERIFICATION (documented in .env.example)
- dropped fabricated Enterprise EUR 499 offer from SoftwareApplication JSON-LD
- article-shell: OL/Table/Note primitives for upcoming articles

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SXUwmPVRTD8AKQtio6gCN5
2026-07-08 23:00:02 +02:00

78 lines
1.8 KiB
TypeScript

import { JsonLd } from '@/components/json-ld';
import {
SEO_KEYWORDS,
SITE_DESCRIPTION,
SITE_NAME,
SITE_TAGLINE,
SITE_URL,
siteJsonLd,
} from '@/lib/seo';
import { GeistMono } from 'geist/font/mono';
import { GeistSans } from 'geist/font/sans';
import type { Metadata } from 'next';
import './globals.css';
const TITLE = `${SITE_NAME}${SITE_TAGLINE}`;
export const metadata: Metadata = {
metadataBase: new URL(SITE_URL),
title: {
default: TITLE,
template: `%s | ${SITE_NAME}`,
},
description: SITE_DESCRIPTION,
applicationName: SITE_NAME,
keywords: SEO_KEYWORDS,
authors: [{ name: SITE_NAME }],
creator: SITE_NAME,
publisher: SITE_NAME,
alternates: {
canonical: '/',
types: { 'application/rss+xml': [{ url: '/feed.xml', title: `${SITE_NAME} — MCP guides` }] },
},
// Google Search Console ownership token. Unset in dev; set in production so
// the sitemap can be submitted and indexing monitored.
...(process.env.NEXT_PUBLIC_GSC_VERIFICATION
? { verification: { google: process.env.NEXT_PUBLIC_GSC_VERIFICATION } }
: {}),
openGraph: {
type: 'website',
locale: 'en_US',
url: SITE_URL,
siteName: SITE_NAME,
title: TITLE,
description: SITE_DESCRIPTION,
},
twitter: {
card: 'summary_large_image',
title: TITLE,
description: SITE_DESCRIPTION,
},
robots: {
index: true,
follow: true,
googleBot: {
index: true,
follow: true,
'max-image-preview': 'large',
'max-snippet': -1,
'max-video-preview': -1,
},
},
};
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html
lang="en"
className={`${GeistSans.variable} ${GeistMono.variable}`}
suppressHydrationWarning
>
<body>
<JsonLd data={siteJsonLd()} />
{children}
</body>
</html>
);
}