runtime/sidebar-utils Functions
Functions exported from runtime/sidebar-utils.ts
findCurrentSidebarItem
function findCurrentSidebarItem(sidebar: SidebarItem[], currentPath: string): SidebarItem | undefined
Parameters
| Name | Type | Description |
|---|---|---|
| sidebar | SidebarItem[] | - |
| currentPath | string | - |
Returns
SidebarItem | undefined
getPrevNextLinks
function getPrevNextLinks(sidebar: SidebarItem[], currentPath: string): { prev?: SidebarItem; next?: SidebarItem }
Parameters
| Name | Type | Description |
|---|---|---|
| sidebar | SidebarItem[] | - |
| currentPath | string | - |
Returns
{ prev?: SidebarItem; next?: SidebarItem }