From 4ffbcaea047ff75420162d809312283e750773ec Mon Sep 17 00:00:00 2001 From: Makisuo Date: Sat, 19 Sep 2026 00:33:51 +0200 Subject: [PATCH 1/2] feat(landing): rebuild the docs shell for reading and split the tree into sections The docs inherited the shared `--font-sans` token, which is Geist Mono, so every paragraph, sidebar row and TOC entry rendered in monospace at 14px; the blog opted its prose into proportional Geist and the docs never did. The header also stacked a category strip that repeated the sidebar's twelve groups and overflowed at 1440px, and shiki's `wrap: true` folded long command lines back to column zero. - DocsLayout sets Geist on ; mono is opted back in per element for code, eyebrows and labels. New `.docs-prose` block sizes the reading scale beside `.docs-content`, which the changelog still renders with. - The tree is split into four sections (Platform, Instrumentation, Local Mode, Reference) declared once in docs-nav.ts. A header strip and a sticky sidebar switcher both read `getDocSections`, and the sidebar only renders the current section's groups. Prev/next stays inside a section. - Wider sidebar and TOC rails, a single-row header with a wider search trigger, code blocks that scroll instead of wrapping, and the rail auto-scroll now moves only far enough to reveal the active row. --- .../src/components/docs/Breadcrumb.astro | 4 +- .../components/docs/DocsCategoryIcon.astro | 3 +- .../src/components/docs/DocsCategoryNav.astro | 62 ------------ .../src/components/docs/DocsMobileNav.astro | 6 +- .../src/components/docs/DocsPrevNext.astro | 25 +++-- .../src/components/docs/DocsSearch.tsx | 6 +- .../src/components/docs/DocsSectionNav.astro | 48 ++++++++++ .../src/components/docs/DocsSidebar.astro | 50 +++++++--- .../components/docs/DocsTableOfContents.astro | 6 +- apps/landing/src/layouts/DocsLayout.astro | 84 ++++++++--------- apps/landing/src/lib/docs-nav.ts | 94 +++++++++++-------- apps/landing/src/lib/docs-order.ts | 22 ++++- apps/landing/src/pages/docs/[...slug].astro | 8 +- apps/landing/src/pages/docs/index.astro | 30 +++--- apps/landing/src/styles/global.css | 60 +++++++++++- 15 files changed, 307 insertions(+), 201 deletions(-) delete mode 100644 apps/landing/src/components/docs/DocsCategoryNav.astro create mode 100644 apps/landing/src/components/docs/DocsSectionNav.astro diff --git a/apps/landing/src/components/docs/Breadcrumb.astro b/apps/landing/src/components/docs/Breadcrumb.astro index 1c2113360..cfb4e8ff4 100644 --- a/apps/landing/src/components/docs/Breadcrumb.astro +++ b/apps/landing/src/components/docs/Breadcrumb.astro @@ -11,7 +11,7 @@ const { group, title } = Astro.props; const groupHref = group === "Instrumentation" ? `/docs/${INSTRUMENTATION_SLUG}` : null; --- -