Vite plugin that automatically generates VitePress sidebar configuration by scanning the docs directory structure. Version 1.7.1 supports options like ignoreList, collapsed groups, title extraction from markdown files or frontmatter, and auto-updates on file changes. Active development with frequent releases. Differentiates by being a dedicated Vite plugin rather than a build-time script, with live HMR support for sidebar regeneration.
npm install vite-plugin-vitepress-auto-sidebarVerified import paths — ran on the pinned version, not inferred.
Configure the plugin in VitePress config to auto-generate sidebar from /docs structure.
Remove the `sidebar` property from `themeConfig` in your config file.
Set `ignoreIndexItem: true` in plugin options.
Use only `titleFromFile` if you want markdown-level heading; use `titleFromFileByYaml` for frontmatter. They are not mutually exclusive.
Ensure the directory specified in `path` exists relative to project root.
Restart the dev server or trigger a production rebuild after file changes.
No action needed.
Run `npm install vite-plugin-vitepress-auto-sidebar` and ensure import is correct.
Change `import { AutoSidebar }` to `import AutoSidebar`.Add themeConfig with empty sidebar or remove the sidebar property.