chore: update to Fumadocs 15.7 (#4154)

Co-authored-by: KinfeMichael Tariku <65047246+Kinfe123@users.noreply.github.com>
Co-authored-by: Kinfe123 <kinfishtech@gmail.com>
This commit is contained in:
Fuma Nama
2025-08-23 10:00:45 +08:00
committed by GitHub
parent c45ad901ce
commit d20f9a763c
32 changed files with 6469 additions and 4588 deletions

10
docs/lib/is-active.ts Normal file
View File

@@ -0,0 +1,10 @@
export function isActive(
url: string,
pathname: string,
nested = true,
): boolean {
if (url.endsWith("/")) url = url.slice(0, -1);
if (pathname.endsWith("/")) pathname = pathname.slice(0, -1);
return url === pathname || (nested && pathname.startsWith(`${url}/`));
}