modify sublink.tsx, markdown.ts and favicon.icon
This commit is contained in:
@@ -114,7 +114,7 @@ export default function SubLink({
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className={cn(
|
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"
|
level > 0 && "pl-4 border-l border-border ml-1.5"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -183,7 +183,9 @@ export async function getDocsTocs(slug: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getPreviousNext(path: 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 {
|
return {
|
||||||
prev: page_routes[index - 1],
|
prev: page_routes[index - 1],
|
||||||
next: 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 |
Reference in New Issue
Block a user