Auto-generate VitePress
nav
and sidebar
configurations.
nav
and secondary folder and files as sidebar
frontmatter
.srcDir
and srcExclude
configurations).index.md
under the sub-folder is displayed separately or by clicking the folder name.frontmatter
configurations to customize article configurations (configured attribute names also support adding prefixes).Gitbook
SUMMARY.md
file as the sidebar
configuration.# Installing vite is recommended when using ts, otherwise you will get type errors.
pnpm i vite-plugin-vitepress-auto-nav vite -D
// .vitepress/config.ts
import AutoNav from “vite-plugin-vitepress-auto-nav”;
export default defineConfig({
vite: {
plugins: [
AutoNav({
// Custom configurations
})
]
}
});
Please refer to the TypeScript type hints