diff --git a/app/(main)/blog/[[...slug]]/page.tsx b/app/(main)/blog/[[...slug]]/page.tsx index c7e92065..24890eb3 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
@@ -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 a397194e..928a5c2c 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 && ( +
+
+ +
+ +
+
+
-
- )} -
+ )} +
+ ); } 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;