Skip to content

๐Ÿ”Œ VitePress Sidebar is a plugin for VitePress that automatically configures and manages the sidebar of your page with simple settings.

License

Notifications You must be signed in to change notification settings

jooy2/vitepress-sidebar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ”Œ VitePress Sidebar

awesome-vitepress license Programming Language Usage Commit Count npm downloads npm latest package npm bundle size Followers Stars

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, zero dependencies
  • โšก๏ธ 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.jooy2.com/guide/getting-started

import { generateSidebar } from 'vitepress-sidebar';

export default {
  themeConfig: {
    sidebar: generateSidebar({
      /*
       * For detailed instructions, see the links below:
       * https://vitepress-sidebar.jooy2.com/guide/api
       */
      // documentRootPath: '/',
      // scanStartPath: null,
      // basePath: null,
      // resolvePath: null,
      // useTitleFromFileHeading: true,
      // useTitleFromFrontmatter: true,
      // frontmatterTitleFieldName: 'title',
      // useFolderTitleFromIndexFile: false,
      // useFolderLinkFromIndexFile: false,
      // hyphenToSpace: true,
      // underscoreToSpace: true,
      // capitalizeFirst: false,
      // capitalizeEachWords: false,
      // collapsed: true,
      // collapseDepth: 2,
      // sortMenusByName: false,
      // sortMenusByFrontmatterOrder: false,
      // sortMenusByFrontmatterDate: false,
      // sortMenusOrderByDescending: false,
      // sortMenusOrderNumericallyFromTitle: false,
      // sortMenusOrderNumericallyFromLink: false,
      // frontmatterOrderDefaultValue: 0,
      // manualSortFileNameByPriority: ['first.md', 'second', 'third.md'],
      // removePrefixAfterOrdering: false,
      // prefixSeparator: '.',
      // excludeFiles: ['first.md', 'secret.md'],
      // excludeFilesByFrontmatterFieldName: 'exclude',
      // excludeFolders: ['secret-folder'],
      // includeDotFiles: false,
      // includeRootIndexFile: false,
      // includeFolderIndexFile: false,
      // includeEmptyFolder: false,
      // rootGroupText: 'Contents',
      // rootGroupLink: 'https://github.com/jooy2',
      // rootGroupCollapsed: false,
      // convertSameNameSubFileToGroupIndexPage: false,
      // folderLinkNotIncludesFileName: false,
      // keepMarkdownSyntaxFromTitle: false,
      // debugPrint: false,
    })
  }
};

Real-world Uses

VitePress Sidebar is utilized in a variety of project environments, including my own web services.

Contribute

You can report issues on GitHub Issue Tracker.

You can also request a pull to fix bugs and add frequently used features. To contribute to a project, follow these steps

  1. Clone the project.
  2. Create changes (features, bugfixes) in a new branch.
  3. Write a test (test/specs/apis.spec.ts) if a new option has been added.
  4. Create a documentation (docs/) if a new option is added.
  5. Request a pull request. Include any changes or considerations in the description for a quick code review.

License

Copyright ยฉ 2022-2024 Jooy2 <jooy2.contact@gmail.com> Released under the MIT license.