From 84dae7ce8721ef22dba7de10f89192a652f9c354 Mon Sep 17 00:00:00 2001 From: Harivansh Rathi Date: Thu, 26 Mar 2026 09:46:01 -0400 Subject: [PATCH] Improve docs structure and navigation Co-authored-by: Codex --- site/src/layouts/DocLayout.astro | 44 +++++++++++++++++++- site/src/pages/architecture.mdx | 9 ++-- site/src/pages/commands.mdx | 24 +++++------ site/src/pages/index.astro | 46 ++++++++++++++++++--- site/src/pages/installation.mdx | 47 ++++++++++++++++++--- site/src/pages/quick-start.mdx | 13 +++--- site/src/pages/runtime-contract.mdx | 4 +- site/src/styles/base.css | 64 ++++++++++++++++++++++++++--- 8 files changed, 210 insertions(+), 41 deletions(-) diff --git a/site/src/layouts/DocLayout.astro b/site/src/layouts/DocLayout.astro index f2608de..1ea835e 100644 --- a/site/src/layouts/DocLayout.astro +++ b/site/src/layouts/DocLayout.astro @@ -9,6 +9,23 @@ const headings: MarkdownHeading[] = Astro.props.headings ?? []; const isIndex = Astro.url.pathname === "/" || Astro.url.pathname === "/index.html"; const h2s = headings.filter((h) => h.depth === 2); +const docsSections = [ + { + title: "Start", + items: [ + { href: "/installation", label: "Installation" }, + { href: "/quick-start", label: "Quick start" }, + ], + }, + { + title: "Reference", + items: [ + { href: "/commands", label: "Commands" }, + { href: "/architecture", label: "Architecture" }, + { href: "/runtime-contract", label: "Runtime contract" }, + ], + }, +]; function formatTocText(text: string): string { if (!text.includes(" ") && /[-.]/.test(text)) { @@ -30,7 +47,7 @@ function formatTocText(text: string): string { { !isIndex && ( -