VitePress Sidebar is a plugin for VitePress 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 support
- β‘οΈ Frontmatter support
- β‘οΈ TypeScript support
- β‘οΈ Customize menus for sorting, special character conversion, file and folder filters, and more!
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
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,
//
// ============ [ GROUPING ] ============
// collapsed: true,
// collapseDepth: 2,
// rootGroupText: 'Contents',
// rootGroupLink: 'https://github.com/jooy2',
// rootGroupCollapsed: false,
//
// ============ [ GETTING MENU TITLE ] ============
// useTitleFromFileHeading: true,
// useTitleFromFrontmatter: true,
// useFolderLinkFromIndexFile: false,
// useFolderTitleFromIndexFile: false,
// frontmatterTitleFieldName: 'title',
//
// ============ [ GETTING MENU LINK ] ============
// useFolderLinkFromSameNameSubFile: false,
// useFolderLinkFromIndexFile: false,
// folderLinkNotIncludesFileName: false,
//
// ============ [ INCLUDE / EXCLUDE ] ============
// excludePattern: ['README.md', 'folder/'],
// excludeFilesByFrontmatterFieldName: 'exclude',
// includeDotFiles: false,
// includeEmptyFolder: false,
// includeRootIndexFile: false,
// includeFolderIndexFile: false,
//
// ============ [ STYLING MENU TITLE ] ============
// hyphenToSpace: true,
// underscoreToSpace: true,
// 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,
// sortMenusByFrontmatterDate: false,
// sortMenusOrderByDescending: false,
// sortMenusOrderNumericallyFromTitle: false,
// sortMenusOrderNumericallyFromLink: false,
//
// ============ [ MISC ] ============
// debugPrint: false,
})
);
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
Anyone can contribute to the project by reporting new issues or submitting a pull request. For more information, please see CONTRIBUTING.md.
Please see the LICENSE file for more information about project owners, usage rights, and more.