From ab9eb029faa3c711dbe00a074926ab09ecda4170 Mon Sep 17 00:00:00 2001 From: os-zhuang Date: Mon, 15 Jun 2026 23:02:18 +0800 Subject: [PATCH] docs: tabbed sidebar nav + de-emphasize objectql/ui/os protocol branding MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Splits the single long docs sidebar into six icon-labelled tabs via fumadocs folder roots (Getting Started, Concepts, Guides, Reference, Protocol, Releases), so readers see one section at a time instead of all 366 pages competing in one rail. - root + icon on each top-level section meta.json; root meta.json reordered so Protocol (the early-emphasis ObjectQL/ObjectUI/ObjectOS layer) sits last and the generated Reference gets its own tab instead of crowding the hand-written docs. - references/meta.json is generated, so the Reference tab's title/icon/root is emitted from packages/spec/scripts/build-docs.ts (title "Protocol Reference" → "Reference"). - Guides regrouped: added a "Foundations" label, moved Service Contracts into Integration, surfaced Cheatsheets under their own label instead of buried after a bare divider. - Renamed colliding "Protocol" labels: "Protocol Overview" → "Protocol", "Contracts Protocol" → "Service Contracts". - Fixed the top-nav GitHub link target: objectstack-ai/spec → framework. Nav-only: no files moved, no doc URLs changed. `next build` compiles all 1113 pages clean; lucide icons resolve with no warnings. Co-Authored-By: Claude Opus 4.8 (1M context) --- .changeset/docs-nav-restructure.md | 4 ++++ apps/docs/lib/layout.shared.tsx | 2 +- content/docs/concepts/meta.json | 2 ++ content/docs/getting-started/meta.json | 2 ++ content/docs/guides/contracts/meta.json | 4 ++-- content/docs/guides/meta.json | 7 +++++-- content/docs/meta.json | 5 +---- content/docs/protocol/meta.json | 4 +++- content/docs/references/meta.json | 4 +++- content/docs/releases/meta.json | 2 ++ packages/spec/scripts/build-docs.ts | 6 +++++- 11 files changed, 30 insertions(+), 12 deletions(-) create mode 100644 .changeset/docs-nav-restructure.md diff --git a/.changeset/docs-nav-restructure.md b/.changeset/docs-nav-restructure.md new file mode 100644 index 00000000000..1b4fda51569 --- /dev/null +++ b/.changeset/docs-nav-restructure.md @@ -0,0 +1,4 @@ +--- +--- + +docs: restructure the docs site left navigation — split the single long sidebar into six icon-labelled tabs (Getting Started, Concepts, Guides, Reference, Protocol, Releases), de-emphasise the ObjectQL/ObjectUI/ObjectOS protocol branding (Protocol moved to the last tab), isolate the 238 generated reference pages into their own tab, group the Guides section (Foundations/Building/Integration/Operations/Cheatsheets), and fix the top-nav GitHub link (objectstack-ai/spec → framework). Nav-only; no doc URLs change. diff --git a/apps/docs/lib/layout.shared.tsx b/apps/docs/lib/layout.shared.tsx index 742c502e80f..aff3b86c246 100644 --- a/apps/docs/lib/layout.shared.tsx +++ b/apps/docs/lib/layout.shared.tsx @@ -3,7 +3,7 @@ import Image from 'next/image'; export const gitConfig = { user: 'objectstack-ai', - repo: 'spec', + repo: 'framework', branch: 'main', }; diff --git a/content/docs/concepts/meta.json b/content/docs/concepts/meta.json index 80d403415a2..944b6b60b0d 100644 --- a/content/docs/concepts/meta.json +++ b/content/docs/concepts/meta.json @@ -1,4 +1,6 @@ { "title": "Concepts", + "icon": "Lightbulb", + "root": true, "pages": ["index", "north-star", "metadata-driven", "metadata-lifecycle", "design-principles", "architecture", "cluster-semantics", "webhook-delivery", "skills", "core", "packages", "setup-app", "cloud-artifact-api", "terminology", "implementation-status"] } diff --git a/content/docs/getting-started/meta.json b/content/docs/getting-started/meta.json index d15443e518a..549a47e10c9 100644 --- a/content/docs/getting-started/meta.json +++ b/content/docs/getting-started/meta.json @@ -1,4 +1,6 @@ { "title": "Getting Started", + "icon": "Rocket", + "root": true, "pages": ["index", "quick-start", "core-concepts", "architecture", "examples", "cli", "glossary"] } diff --git a/content/docs/guides/contracts/meta.json b/content/docs/guides/contracts/meta.json index fd73b73096c..205cf53111d 100644 --- a/content/docs/guides/contracts/meta.json +++ b/content/docs/guides/contracts/meta.json @@ -1,4 +1,4 @@ { - "title": "Contracts Protocol", + "title": "Service Contracts", "pages": ["index", "metadata-service", "auth-service", "storage-service", "data-engine", "cache-service"] -} \ No newline at end of file +} diff --git a/content/docs/guides/meta.json b/content/docs/guides/meta.json index e601f0db27f..95d0783df78 100644 --- a/content/docs/guides/meta.json +++ b/content/docs/guides/meta.json @@ -1,7 +1,10 @@ { "title": "Guides", + "icon": "BookOpen", + "root": true, "pages": [ "index", + "---Foundations---", "packages", "metadata", "adding-a-metadata-type", @@ -26,6 +29,7 @@ "---Integration---", "api-reference", "client-sdk", + "contracts", "project-scoping", "driver-configuration", "kernel-services", @@ -43,8 +47,7 @@ "error-handling-server", "standards", "troubleshooting", - "---", - "contracts", + "---Cheatsheets---", "cheatsheets" ] } diff --git a/content/docs/meta.json b/content/docs/meta.json index d56e1abacda..040a62b6853 100644 --- a/content/docs/meta.json +++ b/content/docs/meta.json @@ -4,11 +4,8 @@ "getting-started", "concepts", "guides", - "---", - "protocol", - "---", "references", - "---", + "protocol", "releases" ] } diff --git a/content/docs/protocol/meta.json b/content/docs/protocol/meta.json index 64257e9e2d6..185065ed994 100644 --- a/content/docs/protocol/meta.json +++ b/content/docs/protocol/meta.json @@ -1,4 +1,6 @@ { - "title": "Protocol Overview", + "title": "Protocol", + "icon": "Network", + "root": true, "pages": ["index", "objectql", "objectui", "objectos", "knowledge"] } diff --git a/content/docs/references/meta.json b/content/docs/references/meta.json index 0f2d02f229a..e42fcada247 100644 --- a/content/docs/references/meta.json +++ b/content/docs/references/meta.json @@ -1,5 +1,7 @@ { - "title": "Protocol Reference", + "title": "Reference", + "icon": "FileCode", + "root": true, "pages": [ "ai", "api", diff --git a/content/docs/releases/meta.json b/content/docs/releases/meta.json index 8389532a630..2e16742adac 100644 --- a/content/docs/releases/meta.json +++ b/content/docs/releases/meta.json @@ -1,4 +1,6 @@ { "title": "Releases", + "icon": "Tag", + "root": true, "pages": ["index", "v9"] } diff --git a/packages/spec/scripts/build-docs.ts b/packages/spec/scripts/build-docs.ts index ba71bd6b61d..1259460e7f1 100644 --- a/packages/spec/scripts/build-docs.ts +++ b/packages/spec/scripts/build-docs.ts @@ -442,7 +442,11 @@ const pages = [ ]; const meta = { - title: "Protocol Reference", + title: "Reference", + icon: "FileCode", + // Render the (large, generated) reference as its own sidebar tab so it does not + // crowd the hand-written docs. Keep in sync with the other root sections' meta.json. + root: true, pages: pages }; fs.writeFileSync(path.join(DOCS_ROOT, 'meta.json'), JSON.stringify(meta, null, 2));