vitepress-sidebar
Version:
A VitePress auto sidebar plugin that automatically creates a simple configuration.
113 lines (97 loc) • 5.01 kB
Markdown
# 🔌 VitePress Sidebar
[](https://github.com/logicspark/awesome-vitepress-v1) [](https://github.com/jooy2/vitepress-sidebar/blob/main/LICENSE)   [](https://www.npmjs.com/package/vitepress-sidebar) [](https://www.npmjs.com/package/vitepress-sidebar)  [](https://github.com/jooy2) 
**VitePress Sidebar** is a plugin for **[VitePress](https://vitepress.dev)** that automatically configures and manages the sidebar of your page with simple settings.
- ⚡️ Optimized for the latest version of **VitePress**
- ⚡️ Easy to use, lots of options to customize to your liking
- ⚡️ Lightweight bundle file size
- ⚡️ [Multiple Sidebars](https://vitepress.dev/reference/default-theme-sidebar#multiple-sidebars) support
- ⚡️ [Frontmatter](https://vitepress.dev/guide/frontmatter) support
- ⚡️ [TypeScript](https://www.typescriptlang.org) support
- ⚡️ Customize menus for sorting, special character conversion, file and folder filters, and more!
## [Documentation (Getting Started & All option lists)](https://vitepress-sidebar.cdget.com/guide/getting-started)
Installing and using the package and defining all the utility methods can be found on the documentation page below: https://vitepress-sidebar.cdget.com/guide/getting-started
```javascript
import { withSidebar } from 'vitepress-sidebar';
const vitePressConfigs = {
title: 'VitePress Sidebar',
themeConfig: {
// ...
}
};
export default defineConfig(
withSidebar(vitePressConfigs, {
/*
* For detailed instructions, see the links below:
* https://vitepress-sidebar.cdget.com/guide/options
*/
//
// ============ [ RESOLVING PATHS ] ============
// documentRootPath: '/',
// scanStartPath: null,
// resolvePath: null,
// basePath: null,
// followSymlinks: false,
//
// ============ [ GROUPING ] ============
// collapsed: false,
// collapseDepth: 2,
// rootGroupText: 'Contents',
// rootGroupLink: 'https://github.com/jooy2',
// rootGroupCollapsed: false,
//
// ============ [ GETTING MENU TITLE ] ============
// useTitleFromFileHeading: false,
// useTitleFromFrontmatter: false,
// useFolderLinkFromIndexFile: false,
// useFolderTitleFromIndexFile: false,
// frontmatterTitleFieldName: 'title',
//
// ============ [ GETTING MENU LINK ] ============
// useFolderLinkFromSameNameSubFile: false,
// useFolderLinkFromIndexFile: false,
// folderLinkNotIncludesFileName: false,
//
// ============ [ INCLUDE / EXCLUDE ] ============
// excludeByGlobPattern: ['README.md', 'folder/'],
// excludeFilesByFrontmatterFieldName: 'exclude',
// excludeByFolderDepth: undefined,
// includeDotFiles: false,
// includeEmptyFolder: false,
// includeRootIndexFile: false,
// includeFolderIndexFile: false,
//
// ============ [ STYLING MENU TITLE ] ============
// hyphenToSpace: false,
// underscoreToSpace: false,
// capitalizeFirst: false,
// capitalizeEachWords: false,
// keepMarkdownSyntaxFromTitle: false,
// removePrefixAfterOrdering: false,
// prefixSeparator: '.',
//
// ============ [ SORTING ] ============
// manualSortFileNameByPriority: ['first.md', 'second', 'third.md'],
// sortFolderTo: null,
// sortMenusByName: false,
// sortMenusByFileDatePrefix: false,
// sortMenusByFrontmatterOrder: false,
// frontmatterOrderDefaultValue: 0,
// sortMenusByFileCreateDate: false,
// sortMenusByFileModifyDate: false,
// sortMenusByFrontmatterDate: false,
// sortMenusOrderByDescending: false,
// sortMenusOrderNumericallyFromTitle: false,
// sortMenusOrderNumericallyFromLink: false,
//
// ============ [ MISC ] ============
// debugPrint: false,
})
);
```
## Real-world Uses
**VitePress Sidebar** is utilized in a variety of project environments, including my own web services.
- To explore packages used other than: https://github.com/jooy2/vitepress-sidebar/network/dependents
## Contributing
Anyone can contribute to the project by reporting new issues or submitting a pull request. For more information, please see [CONTRIBUTING.md](CONTRIBUTING.md).
## License
Please see the [LICENSE](LICENSE) file for more information about project owners, usage rights, and more.