From 7ba1a46f1adb1f453c0c23b8ee96c9f2140087c7 Mon Sep 17 00:00:00 2001 From: Sudha Shrestha Date: Fri, 12 Jun 2026 13:57:40 +0545 Subject: [PATCH 1/3] fix(docs): restore table of contents layout and parsing Restore the xl two-column grid for the TOC rail and parse raw MDX body instead of Velite HTML so headings are extracted correctly. Co-authored-by: Cursor --- app/(main)/blog/[[...slug]]/page.tsx | 4 +- app/(main)/docs/[[...slug]]/page.tsx | 158 ++++++++++++++------------- 2 files changed, 85 insertions(+), 77 deletions(-) diff --git a/app/(main)/blog/[[...slug]]/page.tsx b/app/(main)/blog/[[...slug]]/page.tsx index c7e92065..6860dce4 100644 --- a/app/(main)/blog/[[...slug]]/page.tsx +++ b/app/(main)/blog/[[...slug]]/page.tsx @@ -82,10 +82,10 @@ export default async function BlogPage({ params }: BlogPageProps) { notFound(); } - const toc = await getTableOfContents(blog.content); + const toc = await getTableOfContents(blog.body); return ( -
+
Blog
diff --git a/app/(main)/docs/[[...slug]]/page.tsx b/app/(main)/docs/[[...slug]]/page.tsx index a397194e..90943ce2 100644 --- a/app/(main)/docs/[[...slug]]/page.tsx +++ b/app/(main)/docs/[[...slug]]/page.tsx @@ -73,93 +73,101 @@ export default async function DocPage({ params }: DocPageProps) { notFound(); } - const toc = await getTableOfContents(doc.content); + const toc = await getTableOfContents(doc.body); return ( -
+ <> -
-
-
Docs
- - -
-
-

{doc.title}

- {doc.description && ( -

{doc.description}

- )} -
- {doc.labels?.map((label) => { - return ( - - {label} - - ); - })} +
+
+
+
Docs
+ +
-
- {doc.links ? ( -
- {doc.links?.doc && ( - - Docs - - +
+

{doc.title}

+ {doc.description && ( +

{doc.description}

)} - {doc.links?.api && ( +
+ {doc.labels?.map((label) => { + return ( + + {label} + + ); + })} +
+
+ {doc.links ? ( +
+ {doc.links?.doc && ( + + Docs + + + )} + {doc.links?.api && ( + + API Reference + + + )} +
+ ) : null} + +
+ +
+
+ + +
- API Reference - + Edit this page on GitHub - )} -
- ) : null} - -
- -
-
- - -
- - Edit this page on GitHub - +
+
- -
- {doc.toc && ( -
-
- -
- -
-
+ {doc.toc && ( +
+
+ +
+ +
+
+
-
- )} -
+ )} +
+ ); } From 981f17bd839f15e0a1c222575470811416813518 Mon Sep 17 00:00:00 2001 From: Sudha Shrestha Date: Fri, 12 Jun 2026 14:15:47 +0545 Subject: [PATCH 2/3] fix(docs): improve sidebar nav readability Use IBM Plex Sans at regular weight with foreground text in the docs sidebar. Co-authored-by: Cursor --- components/sidebar-nav.tsx | 8 +++----- styles/docs.css | 5 +++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/components/sidebar-nav.tsx b/components/sidebar-nav.tsx index 918de92f..dcc2c87f 100644 --- a/components/sidebar-nav.tsx +++ b/components/sidebar-nav.tsx @@ -340,7 +340,7 @@ interface DocsSidebarNavItemsProps { export function DocsSidebarNavItems({ items, pathname }: DocsSidebarNavItemsProps) { return items?.length ? ( -
+
{items.map((item) => { const itemKey = item.href ?? item.title; @@ -353,9 +353,7 @@ export function DocsSidebarNavItems({ items, pathname }: DocsSidebarNavItemsProp className={cn( "group flex w-full items-center rounded-md border border-transparent px-2 py-1 capitalize hover:underline", item.disabled && "cursor-not-allowed opacity-60", - pathname === item.href - ? "bg-muted font-normal text-foreground" - : "text-muted-foreground", + pathname === item.href ? "bg-muted" : undefined, )} target={item.external ? "_blank" : ""} rel={item.external ? "noreferrer" : ""} @@ -374,7 +372,7 @@ export function DocsSidebarNavItems({ items, pathname }: DocsSidebarNavItemsProp diff --git a/styles/docs.css b/styles/docs.css index 218a2583..9c3f59a0 100644 --- a/styles/docs.css +++ b/styles/docs.css @@ -13,6 +13,11 @@ font-feature-settings: "ss02", "ss09"; } +.docs-shell aside { + font-family: var(--font-sans); + font-weight: 400; +} + .docs-sidebar-scroller { scrollbar-width: thin; scrollbar-color: hsl(var(--border)) transparent; From 21fc463bd37c9f0d5997cf716a7f3a93ac5940f3 Mon Sep 17 00:00:00 2001 From: Sudha Shrestha Date: Fri, 12 Jun 2026 14:33:12 +0545 Subject: [PATCH 3/3] fix(docs): show table of contents from lg breakpoint Move the TOC grid and visibility from xl to lg so the rail appears at 1024px. Co-authored-by: Cursor --- app/(main)/blog/[[...slug]]/page.tsx | 4 ++-- app/(main)/docs/[[...slug]]/page.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/(main)/blog/[[...slug]]/page.tsx b/app/(main)/blog/[[...slug]]/page.tsx index 6860dce4..24890eb3 100644 --- a/app/(main)/blog/[[...slug]]/page.tsx +++ b/app/(main)/blog/[[...slug]]/page.tsx @@ -85,7 +85,7 @@ export default async function BlogPage({ params }: BlogPageProps) { const toc = await getTableOfContents(blog.body); return ( -
+
Blog
@@ -154,7 +154,7 @@ export default async function BlogPage({ params }: BlogPageProps) {
{blog.toc && ( -
+
diff --git a/app/(main)/docs/[[...slug]]/page.tsx b/app/(main)/docs/[[...slug]]/page.tsx index 90943ce2..928a5c2c 100644 --- a/app/(main)/docs/[[...slug]]/page.tsx +++ b/app/(main)/docs/[[...slug]]/page.tsx @@ -80,7 +80,7 @@ export default async function DocPage({ params }: DocPageProps) {
@@ -157,7 +157,7 @@ export default async function DocPage({ params }: DocPageProps) {
{doc.toc && ( -
+