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..e5da0a3c200 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,142 @@ 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, + openGraph: { + type: "website", + 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 softwareApplicationJsonLd = { + "@context": "https://schema.org", + "@type": "SoftwareApplication", + name: "Celestia Node API", + applicationCategory: "DeveloperApplication", + operatingSystem: ["Linux", "macOS"], + url: `${SITE_ORIGIN}/build/rpc/node-api/`, + softwareHelp: `${SITE_ORIGIN}/operate/maintenance/troubleshooting/`, + isAccessibleForFree: true, + publisher: { + "@type": "Organization", + name: "Celestia", + url: "https://celestia.org", + }, }; +const faqJsonLd = { + "@context": "https://schema.org", + "@type": "FAQPage", + mainEntity: [ + { + "@type": "Question", + name: "Where can I troubleshoot Celestia node issues?", + acceptedAnswer: { + "@type": "Answer", + text: "Use the Celestia troubleshooting documentation for common node, sync, network, and operational issues.", + url: `${SITE_ORIGIN}/operate/maintenance/troubleshooting/`, + }, + }, + { + "@type": "Question", + name: "Where can I find the Celestia Node API reference?", + acceptedAnswer: { + "@type": "Answer", + text: "Use the Celestia Node API reference for RPC methods and the OpenRPC specification for machine-readable API details.", + url: `${SITE_ORIGIN}/build/rpc/node-api/`, + }, + }, + { + "@type": "Question", + name: "Where can I learn how to run a Celestia light node?", + acceptedAnswer: { + "@type": "Answer", + text: "Start with the light node quickstart guide, then use the troubleshooting page if setup, sync, or connectivity issues appear.", + url: `${SITE_ORIGIN}/operate/data-availability/light-node/quickstart/`, + }, + }, + ], +}; + +const jsonLd = [ + organizationJsonLd, + websiteJsonLd, + documentationJsonLd, + softwareApplicationJsonLd, + faqJsonLd, +]; + const banner = ( Welcome to our new docs! 🎉 ); @@ -83,11 +219,29 @@ export default async function RootLayout({ href={withBasePath("/favicons/favicon-16x16.png")} /> - - + + + + {jsonLd.map((data, index) => ( +