From 07f7480e5f7dd0d4b6b6262cfe3fbd1d424cc3e8 Mon Sep 17 00:00:00 2001 From: bordumb Date: Mon, 20 Jul 2026 16:27:43 +0100 Subject: [PATCH] =?UTF-8?q?docs:=20witness-network=20IA=20redesign=20?= =?UTF-8?q?=E2=80=94=20promote=20to=20a=20top-level=20area?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Moves the witness-network pages out from under mcp to their own top-level docs area, with a shared NavSection disclosure component and the supporting content-layer + config changes. See docs/docs-ia-redesign-plan.md. Co-Authored-By: Claude Fable 5 Auths-Id: did:keri:EB5cPHY0t-ejNC_rUzPS1dclTvd6kG-R9mQzjozCuGgd Auths-Device: did:keri:EB5cPHY0t-ejNC_rUzPS1dclTvd6kG-R9mQzjozCuGgd Auths-Anchor-Seq: 13 --- components/docs/DocsSidebar.tsx | 113 +---- components/docs/NavSection.tsx | 153 +++++++ components/markdoc/CodeTabs.tsx | 28 +- .../anchor-your-attestation.md | 99 ----- .../mcp/witness-network/choose-witnesses.md | 71 --- .../docs/mcp/witness-network/conformance.md | 73 ---- content/docs/mcp/witness-network/index.md | 59 --- .../docs/mcp/witness-network/run-a-witness.md | 111 ----- .../mcp/witness-network/verify-freshness.md | 83 ---- content/docs/witness-network/glossary.md | 33 ++ content/docs/witness-network/index.md | 43 ++ .../operators/deploy-for-real.md | 58 +++ .../witness-network/operators/get-listed.md | 60 +++ .../operators/keep-the-registry-synced.md | 42 ++ .../operators/monitor-your-node.md | 52 +++ .../operators/prove-conformance.md | 53 +++ .../witness-network/operators/run-a-node.md | 71 +++ .../reference/acceptance-rules.md | 91 ++++ .../witness-network/reference/anchor-api.md | 78 ++++ .../reference/witness-node-cli.md | 64 +++ .../users/anchor-your-attestation.md | 62 +++ .../users/choose-your-witnesses.md | 47 ++ .../witness-network/users/do-i-need-this.md | 33 ++ .../users/handle-a-duplicity-proof.md | 42 ++ .../users/verify-an-anchored-attestation.md | 58 +++ docs/docs-ia-redesign-plan.md | 406 ++++++++++++++++++ lib/content.ts | 39 +- next-env.d.ts | 2 +- next.config.ts | 8 + 29 files changed, 1516 insertions(+), 616 deletions(-) create mode 100644 components/docs/NavSection.tsx delete mode 100644 content/docs/mcp/witness-network/anchor-your-attestation.md delete mode 100644 content/docs/mcp/witness-network/choose-witnesses.md delete mode 100644 content/docs/mcp/witness-network/conformance.md delete mode 100644 content/docs/mcp/witness-network/index.md delete mode 100644 content/docs/mcp/witness-network/run-a-witness.md delete mode 100644 content/docs/mcp/witness-network/verify-freshness.md create mode 100644 content/docs/witness-network/glossary.md create mode 100644 content/docs/witness-network/index.md create mode 100644 content/docs/witness-network/operators/deploy-for-real.md create mode 100644 content/docs/witness-network/operators/get-listed.md create mode 100644 content/docs/witness-network/operators/keep-the-registry-synced.md create mode 100644 content/docs/witness-network/operators/monitor-your-node.md create mode 100644 content/docs/witness-network/operators/prove-conformance.md create mode 100644 content/docs/witness-network/operators/run-a-node.md create mode 100644 content/docs/witness-network/reference/acceptance-rules.md create mode 100644 content/docs/witness-network/reference/anchor-api.md create mode 100644 content/docs/witness-network/reference/witness-node-cli.md create mode 100644 content/docs/witness-network/users/anchor-your-attestation.md create mode 100644 content/docs/witness-network/users/choose-your-witnesses.md create mode 100644 content/docs/witness-network/users/do-i-need-this.md create mode 100644 content/docs/witness-network/users/handle-a-duplicity-proof.md create mode 100644 content/docs/witness-network/users/verify-an-anchored-attestation.md create mode 100644 docs/docs-ia-redesign-plan.md diff --git a/components/docs/DocsSidebar.tsx b/components/docs/DocsSidebar.tsx index 97f2929..fcd0ab2 100644 --- a/components/docs/DocsSidebar.tsx +++ b/components/docs/DocsSidebar.tsx @@ -1,18 +1,17 @@ 'use client' import Link from 'next/link' -import { useEffect, useState } from 'react' import { usePathname } from 'next/navigation' -import { ChevronDown } from 'lucide-react' -import type { NavSection, ProductNav } from '@/lib/content' +import type { ProductNav } from '@/lib/content' +import { NavSection } from './NavSection' /** - * Frontmatter-derived nav with the product switch on top: auths-mcp and - * Identity & signing are separate worlds that never intermix. The switch - * navigates to each product's landing page; the shown product follows the URL. + * Frontmatter-derived nav with the area switch on top. Areas are separate + * worlds that never intermix; the switch navigates to each area's landing page + * and the shown area follows the URL. * - * Sections come in two shapes: flat (always open) and collapsible — one row - * with a chevron for large topics, auto-expanded while the reader is inside. + * Every section renders through the one shared {@link NavSection} disclosure — + * same caret, same behaviour, in every area. */ function productForPath(nav: ProductNav[], pathname: string): ProductNav['product'] { @@ -22,7 +21,7 @@ function productForPath(nav: ProductNav[], pathname: string): ProductNav['produc return 'mcp' } -/** A product's first navigable page — where its switch tab points. */ +/** An area's first navigable page — where its switch tab points. */ function landingHref(p: ProductNav): string { for (const section of p.sections) { const first = section.items.find((i) => i.badge !== 'soon') @@ -31,83 +30,14 @@ function landingHref(p: ProductNav): string { return '#' } -function SectionItems({ section, pathname }: { section: NavSection; pathname: string }) { - return ( - - ) -} - -/** A large topic folded to one row; opens on click and while a child is active. */ -function CollapsibleSection({ section, pathname }: { section: NavSection; pathname: string }) { - const containsActive = section.items.some((i) => i.href === pathname) - const [open, setOpen] = useState(containsActive) - useEffect(() => { - if (containsActive) setOpen(true) - }, [containsActive]) - - return ( -
- - {open ? : null} -
- ) -} - export function DocsSidebar({ nav }: { nav: ProductNav[] }) { const pathname = usePathname() const currentProduct = productForPath(nav, pathname) const active = nav.find((p) => p.product === currentProduct) ?? nav[0] return ( -