diff --git a/docs/next.config.mjs b/docs/next.config.mjs
index 97b3362..bbbe4f0 100644
--- a/docs/next.config.mjs
+++ b/docs/next.config.mjs
@@ -20,7 +20,7 @@ export default withMdx({
rehypePrettyCode,
/** @type {import("rehype-pretty-code").Options} */
({
- theme: { dark: "one-dark-pro", light: "github-light" },
+ theme: { dark: "one-dark-pro", light: "min-light" },
getHighlighter,
onVisitLine(node) {
// Prevent lines from collapsing in `display: grid` mode, and allow empty
diff --git a/docs/src/app/docs/layout.tsx b/docs/src/app/docs/layout.tsx
index ec5e67f..56e0a3e 100644
--- a/docs/src/app/docs/layout.tsx
+++ b/docs/src/app/docs/layout.tsx
@@ -14,7 +14,7 @@ export const metadata: Metadata = {
export default function DocsLayout(props: { children: ReactNode }) {
return (
-
diff --git a/docs/src/components/main-nav.tsx b/docs/src/components/main-nav.tsx
index 5c26454..d6d2d46 100644
--- a/docs/src/components/main-nav.tsx
+++ b/docs/src/components/main-nav.tsx
@@ -5,7 +5,7 @@ import Link from "next/link";
import { cn } from "@/lib/cn";
import { Icons } from "@/components/icons";
-import { usePathname } from "next/navigation";
+import { useSelectedLayoutSegment } from "next/navigation";
export interface NavItem {
title: string;
@@ -17,30 +17,31 @@ export interface NavItem {
}
export function MainNav(props: { items: NavItem[] }) {
- const pathname = usePathname();
+ const segment = useSelectedLayoutSegment();
+
+ const isActive = (href: string) => {
+ if (!segment) return false;
+ return href.startsWith(`/${segment}`);
+ };
return (
-
- {props.items?.length ? (
-
- ) : null}
-
+
);
}
diff --git a/docs/src/components/mobile-nav.tsx b/docs/src/components/mobile-nav.tsx
index ccc9f2d..4ec0c66 100644
--- a/docs/src/components/mobile-nav.tsx
+++ b/docs/src/components/mobile-nav.tsx
@@ -34,12 +34,14 @@ export function MobileDropdown(props: {
-
+
{props.items.docs.map((item, index) => (
diff --git a/docs/src/components/site-header.tsx b/docs/src/components/site-header.tsx
index a951a7b..45a030e 100644
--- a/docs/src/components/site-header.tsx
+++ b/docs/src/components/site-header.tsx
@@ -9,50 +9,52 @@ import { MobileDropdown } from "@/components/mobile-nav";
export function SiteHeader() {
return (
-
-
-
-
-
- {siteConfig.name}
-
-
-
-
-
-