@geongu.park/vitepress-plugin-autosidebar

1.0.8 • Public • Published

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

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

    Package Sidebar

    Install

    npm i @geongu.park/vitepress-plugin-autosidebar

    Weekly Downloads

    0

    Version

    1.0.8

    License

    ISC

    Unpacked Size

    27.8 kB

    Total Files

    11

    Last publish

    Collaborators

    • geongu.park