From 920c5f0ca2482ec56cfc0f7f6dd2859943274739 Mon Sep 17 00:00:00 2001 From: Gabriel Barros Date: Fri, 22 May 2026 10:13:43 -0300 Subject: [PATCH 1/3] Improve docs AI readiness assets --- .gitignore | 7 + app/layout.tsx | 113 +++++++++++++- scripts/generate-llms.js | 323 ++++++++++++++++++++++++++++++++++----- 3 files changed, 403 insertions(+), 40 deletions(-) diff --git a/.gitignore b/.gitignore index 0f1fffd8970..c0a76da121f 100644 --- a/.gitignore +++ b/.gitignore @@ -46,4 +46,11 @@ _pagefind/ # agents llms AGENTS.md /public/llms.txt +/public/llms-full.txt +/public/**/*.md +!/public/SKILL.md +/public/**/llms.txt +/public/robots.txt +/public/sitemap.xml +/public/.well-known/ package-lock.json diff --git a/app/layout.tsx b/app/layout.tsx index 8d4b124174e..e1e48402576 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -6,6 +6,10 @@ import "nextra-theme-docs/style.css"; import "katex/dist/katex.min.css"; import { FontStyles } from "@/components/FontStyles"; +const SITE_ORIGIN = "https://docs.celestia.org"; +const SITE_DESCRIPTION = + "Learn, build, and operate on Celestia - the modular data availability network."; + // Use BASE env var (same as next.config.mjs) and ensure it's available client-side const basePath = process.env.NEXT_PUBLIC_BASE_PATH || @@ -23,10 +27,90 @@ const THEME_CONFIG = { primarySaturation: 100, }; export const metadata = { - // Define your metadata here - // For more information on metadata API, see: https://nextjs.org/docs/app/building-your-application/optimizing/metadata + metadataBase: new URL(SITE_ORIGIN), + title: { + default: "Celestia Documentation", + template: "%s - Celestia Documentation", + }, + description: SITE_DESCRIPTION, + alternates: { + canonical: "/", + }, + openGraph: { + type: "website", + url: SITE_ORIGIN, + siteName: "Celestia Documentation", + title: "Celestia Documentation", + description: SITE_DESCRIPTION, + images: [ + { + url: "/Celestia-og.png", + width: 1200, + height: 630, + alt: "Celestia Documentation", + }, + ], + }, + twitter: { + card: "summary_large_image", + site: "@CelestiaOrg", + title: "Celestia Documentation", + description: SITE_DESCRIPTION, + images: ["/Celestia-og.png"], + }, + robots: { + index: true, + follow: true, + googleBot: { + index: true, + follow: true, + }, + }, +}; + +const organizationJsonLd = { + "@context": "https://schema.org", + "@type": "Organization", + name: "Celestia", + url: "https://celestia.org", + logo: `${SITE_ORIGIN}/logo-light.svg`, + sameAs: [ + "https://github.com/celestiaorg", + "https://x.com/CelestiaOrg", + "https://discord.com/invite/YsnTPcSfWQ", + ], +}; + +const websiteJsonLd = { + "@context": "https://schema.org", + "@type": "WebSite", + name: "Celestia Documentation", + url: SITE_ORIGIN, + description: SITE_DESCRIPTION, +}; + +const documentationJsonLd = { + "@context": "https://schema.org", + "@type": "TechArticle", + headline: "Celestia Documentation", + description: SITE_DESCRIPTION, + url: SITE_ORIGIN, + publisher: { + "@type": "Organization", + name: "Celestia", + url: "https://celestia.org", + }, + about: [ + "Celestia", + "data availability", + "modular blockchain", + "blobspace", + "node operation", + ], }; +const jsonLd = [organizationJsonLd, websiteJsonLd, documentationJsonLd]; + const banner = ( Welcome to our new docs! 🎉 ); @@ -86,8 +170,31 @@ export default async function RootLayout({ + + + + + {jsonLd.map((data, index) => ( +