UNPKG

vitepress-plugin-auto-sidebar

Version:
24 lines (23 loc) 597 B
import { Options, SidebarItem } from './types'; /** * Generate VitePress sidebar configuration from folder structure * @param options - Plugin configuration options * @returns Sidebar configuration array * * @example * ```typescript * import { getSidebar } from 'vitepress-plugin-auto-sidebar' * * export default { * themeConfig: { * sidebar: getSidebar({ * contentRoot: '/', * contentDirs: ['guide', 'api'], * collapsible: true, * collapsed: false * }) * } * } * ``` */ export declare function getSidebar(options?: Options): SidebarItem[];