1.0.8 • Published 12 months ago

@geongu.park/vitepress-plugin-autosidebar v1.0.8

Weekly downloads
-
License
ISC
Repository
github
Last release
12 months ago

vitepress-plugin-autosidebar

Auto sidebar for vitepress v2

logo_long


npm version License Build Documentation lastcommit

  • The vitepress-plugin-autosidebar framework makes it easy to generate sidebar in vitepress v2.

Installation

Install the package using npm:

npm install @geongu.park/vitepress-plugin-autosidebar -D

Usage

const rootPath = __dirname;
const directoryPath = '';
const excludeFileName = ['README'];

const result = await getSidebar(rootPath, directoryPath, excludeFileName);

API

  • getSidebar(rootPath: string, directoryPath: string, excludeFileName?: string[]): Promise<{ text: string, link: string }[]>

    • Parameters

      • rootPath (required): The root path of the directory.
      • directoryPath (required): The directory path from the root path.
      • excludeFileName (optional): An array of file names to exclude from the sidebar (default: 'index').
    • Returns
      a promise that resolves to an array of sidebar items. Each item has a text property representing the file name without the extension and a link property representing the file path.

License

This project is licensed under the MIT License.

Support

If you encounter any issues or have any questions, feel free to open an issue in the issue tracker.

Author

geongu.park

1.0.8

12 months ago

1.0.7

12 months ago

1.0.6

12 months ago

1.0.5

12 months ago

1.0.4

12 months ago

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago