# docsify-generate-sidebar

> A docsify plugin that generates sidebar based on directory structure

Latest version **1.0.13** (published 2024-01-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install docsify-generate-sidebar
pnpm add docsify-generate-sidebar
yarn add docsify-generate-sidebar
bun add docsify-generate-sidebar
```

Provides the command `docsify-generate-sidebar`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.13 |
| Published | 2024-01-08 |
| First published | 2023-12-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 11.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Mithun Karthick |
| Maintainers | themyth333 |
| Keywords | docsify, generate, sidebar, plugin |

## Links

- npm: https://www.npmjs.com/package/docsify-generate-sidebar
- Repository: https://github.com/MithunKarthick/docsify-generate-sidebar
- Homepage: https://github.com/MithunKarthick/docsify-generate-sidebar#readme
- Issues: https://github.com/MithunKarthick/docsify-generate-sidebar/issues
- npm.io page: https://npm.io/package/docsify-generate-sidebar

## Dependencies (2)

- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [standard-version](https://npm.io/package/standard-version.md) ^9.5.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.13 (latest) — 2024-01-08
- 1.0.8 (development) — 2023-12-18
- 1.0.12 — 2024-01-07
- 1.0.9 — 2023-12-18
- 1.0.7 — 2023-12-17

## README

# docsify-generate-sidebar
[![Test](https://github.com/MithunKarthick/docsify-generate-sidebar/actions/workflows/test.yml/badge.svg)](https://github.com/MithunKarthick/docsify-generate-sidebar/actions/workflows/test.yml)
<!-- [![Publish](https://github.com/MithunKarthick/docsify-generate-sidebar/actions/workflows/publish.yml/badge.svg)](https://github.com/MithunKarthick/docsify-generate-sidebar/actions/workflows/publish.yml) -->

A [docsify](https://docsify.js.org/#/) plugin that generates [sidebar](https://docsify.js.org/#/more-pages?id=sidebar) based on directory structure.

## Install

```
npm install --save-dev docsify-generate-sidebar
```

## Usage

Add script into package.json:

```
{
  "scripts": {
    "generate": "docsify-generate-sidebar <content-path> <sidebar-path>"
  }
}
```

Run script:

```
npm run generate
```

By default the root path is considered. You can change this by providing the `content-path` argument.
Likewise sidebat path is by default will be same as the `content-path`. Change this by passing `sidebar-path`



For Example, the below structure

```
pages 
│
└───01-Parent_With_Readme
│   │   README.md
│   │
│   └───Child
│       │   README.md
│       │   01-ChildContent.md
│       |   02-ChildContent.md
│   
└───02-Parent_Without_Readme
│   |
│   └───Child
│       │   README.md
│       │   A-ChildContent.md
│       │   B-ChildContent.md
│       └───SubChild
│           │   README.md
│           └───SubChildContent1.md
```

will be generate as below:

```
- [Parent_With_Readme](pages/01-Parent_With_Readme/README.md)
  - [Child](pages/01-Parent_With_Readme/Child/README.md)
    - [ChildContent](pages/01-Parent_With_Readme/Child/01-ChildContent.md)
    - [ChildContent](pages/01-Parent_With_Readme/Child/02-ChildContent.md)
- Parent_Without_Readme
  - [Child](pages/02-Parent_Without_Readme/Child/README.md)
    - [ChildContent](pages/02-Parent_Without_Readme/Child/A-ChildContent.md)
    - [ChildContent](pages/02-Parent_Without_Readme/Child/B-ChildContent.md)
    - [SubChild](pages/02-Parent_Without_Readme/Child/SubChild/README.md)
      - [SubChildContent1](pages/02-Parent_Without_Readme/Child/SubChild/SubChildContent1.md)
```

>[!NOTE]
> The symbol `-` is considered as seperator. You can order the files with numbers separated by filenames. Only the names after seperator will be considered.

## Todo

- Add config to get files/filepaths that need to ignored
- Add release action in github
- Add support for directories with space

---
_Source: https://npm.io/package/docsify-generate-sidebar · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
