Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
166 changes: 160 additions & 6 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand All @@ -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: [
Comment thread
gbarros marked this conversation as resolved.
{
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 = (
<Banner storageKey="some-key">Welcome to our new docs! 🎉</Banner>
);
Expand Down Expand Up @@ -83,11 +219,29 @@ export default async function RootLayout({
href={withBasePath("/favicons/favicon-16x16.png")}
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta property="og:title" content="Celestia Documentation" />
<meta
property="og:description"
content="Learn, build, and operate on Celestia - the first modular blockchain network."
<link rel="alternate" type="text/plain" href={withBasePath("/llms.txt")} />
<link
rel="alternate"
type="text/plain"
href={withBasePath("/llms-full.txt")}
/>
<link
rel="service-desc"
type="application/linkset+json"
href={withBasePath("/.well-known/api-catalog")}
/>
<link
rel="describedby"
type="application/json"
href={withBasePath("/.well-known/agent-skills/index.json")}
/>
{jsonLd.map((data, index) => (
<script
key={index}
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(data) }}
/>
))}
</Head>
<body>
<Layout
Expand Down
Loading