vitepress-plugin-sidebar-permalink
Version:
VitePress 自动生成 sidebar 和 permalink rewrites 的插件
17 lines (14 loc) • 691 B
TypeScript
import { a as SidebarItem } from './shared/vitepress-plugin-sidebar-permalink.CMIevfU-.js';
/** 收集 private: true 的 permalink 列表 */
declare function collectPrivatePermalinks(docsRoot: string, ignoreDirs?: string[]): string[];
declare function itemsWithStyle(dir: string, root: string, rewrites: Record<string, string>, options?: {
collapsed: boolean;
}, sidebarKey?: string): SidebarItem[];
declare function genSidebar(navLinks: {
text: string;
link?: string;
items?: any[];
}[], root: string, rewrites: Record<string, string>, options?: {
collapsed: boolean;
}): Record<string, SidebarItem[]>;
export { collectPrivatePermalinks, genSidebar, itemsWithStyle };