1.2.0 • Published 1 month ago

vitepress-plugin-auto-sidebar v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

VitePress Plugin: Auto Sidebar

:zap: VitePress Plugin: Auto Sidebar

npm version npm downloads License

Generate the VitePress sidebar through the folder structure.

Features

  • Small library
  • TypeScript Support

Setup

yarn add vitepress-plugin-auto-sidebar # yarn
npm i vitepress-plugin-auto-sidebar # npm

Basic usage

.vitepress/config.js

import { getSidebar } from 'vitepress-plugin-auto-sidebar'

export default {
  themeConfig: {
    sidebar: getSidebar({ contentRoot: '/', contentDirs: ['team'], collapsible: true, collapsed: true })
  }
}

Options

  • contentRoot – Default: '/'

    String Root of your VitePress Docs

  • contentDirs – Default: '/'

    Array of indexable contentRoot dirs, if you want to include separately. Accepts string[] or { path: string, title?: string }[]

  • collapsible – Default: true

    Boolean whether the first level can be unfolded

  • collapsed – Default: true

    Boolean whether the first level items are already expanded after loading

  • useFrontmatter - Default: false

    Boolean whether use front-matter for title of items

Tips: If you want to ignore a file, name the .md file with an underscore (_).

License

Copyright (c) 2022 Jonathan Schneider MIT License

1.2.0

1 month ago

1.1.0

11 months ago

1.0.7

12 months ago

1.0.6

1 year ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago