Skip to content

Interface: VitePressNavOptions

Configures generated VitePress sidebar data and optional navigation artifacts.

Signature

ts
export interface VitePressNavOptions

Properties

NameTypeDescription
collapsed (optional)boolean | ((item: ApiDocsNavItem, depth: number) => boolean | undefined)Collapsed state for generated sidebar branches, or a resolver called per item. A boolean value also controls the top-level section when section.collapsed is omitted. Default: undefined
enabled (optional)booleanWhether generated navigation integration is enabled. Default: true
exportName (optional)stringNamed export used in the generated navigation code file. Default: 'apiDocsNav'
insert (optional)VitePressSidebarInsertPositioning strategy used when merging generated items into an existing sidebar. Default: 'append'
outputFile (optional)string | falseFile path for generated navigation code, or false to skip writing it. Default: undefined
replaceText (optional)stringSidebar item text to replace when insert is set to replace. Default: undefined
section (optional)VitePressSidebarSectionOptionsOptional top-level sidebar section that wraps all generated API doc items. Default: undefined
sidebarRoute (optional)stringRoute key to update when the existing VitePress sidebar is a route map. Default: undefined
virtualModule (optional)string | falseVirtual module id that exposes generated navigation data, or false to disable it. Default: false