vitepress-plugin-auto-sidebar
Version:
Generate the VitePress sidebar through the folder structure.
24 lines (23 loc) • 597 B
TypeScript
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[];