modify sublink.tsx, markdown.ts and favicon.icon

This commit is contained in:
Dwindi Ramadhana
2026-02-28 00:16:43 +07:00
parent 8789de2e2c
commit aac81dff8a
3 changed files with 8 additions and 6 deletions

View File

@@ -114,7 +114,7 @@ export default function SubLink({
>
<div
className={cn(
"flex flex-col items-start sm:text-sm text-foreground/80 ml-0.5 mt-2.5 gap-3 transition-colors",
"flex flex-col items-start sm:text-sm text-foreground/80 ml-0.5 mt-1.5 gap-3 transition-colors",
level > 0 && "pl-4 border-l border-border ml-1.5"
)}
>

View File

@@ -183,7 +183,9 @@ export async function getDocsTocs(slug: string) {
}
export function getPreviousNext(path: string) {
const index = page_routes.findIndex(({ href }) => href == `/${path}`);
// path comes in as "getting-started/introduction" but page_routes has "/docs/getting-started/introduction"
const fullPath = path ? `/docs/${path}` : "/docs";
const index = page_routes.findIndex(({ href }) => href === fullPath);
return {
prev: page_routes[index - 1],
next: page_routes[index + 1],

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB