# vue-sidebar-generator

> This is a work in progress project I decided to create to simplify the process of creating a vuepress site. Where the user is able publish content without having to update config.js to add the content to the sidebar.

Latest version **1.0.10** (published 2019-03-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-sidebar-generator
pnpm add vue-sidebar-generator
yarn add vue-sidebar-generator
bun add vue-sidebar-generator
```

## 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.10 |
| Published | 2019-03-13 |
| First published | 2019-03-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Peder Aalen |
| Maintainers | pederyo |
| Keywords | vuepress, sidebar, automatic-sidebar |

## Links

- npm: https://www.npmjs.com/package/vue-sidebar-generator
- Repository: https://github.com/181221/vue-sidebar-generator
- Homepage: https://github.com/181221/vue-sidebar-generator#readme
- Issues: https://github.com/181221/vue-sidebar-generator/issues
- npm.io page: https://npm.io/package/vue-sidebar-generator

## Dependencies (1)

- [promise](https://npm.io/package/promise.md) ^8.0.2

## 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.10 (latest) — 2019-03-13
- 1.0.9 — 2019-03-13
- 1.0.8 — 2019-03-13
- 1.0.7 — 2019-03-13
- 1.0.6 — 2019-03-13
- 1.0.5 — 2019-03-13
- 1.0.4 — 2019-03-13
- 1.0.3 — 2019-03-13
- 1.0.2 — 2019-03-13
- 1.0.1 — 2019-03-13
- 1.0.0 — 2019-03-13

## README

### Vuepress sidebar generator

This package reads folders in your workdir with a README.md file and appends it to your sidebar

### Getting started

    npm i vue-sidebar-generator
    or
    yarn add vue-sidebar-generator

In config.js

    let Sidebar = require("vue-sidebar-generator")

    const init = () => {
        let sidebar = Sidebar.autoSidebar(); // default path is "./"

        return {
            // rest of config options
            sidebar: {
                "/": sidebar
            },
            //config options
        }
    }
    module.exports = init();

### support for folders - netlify

    const init = () => {
        const path = "./docs"
        const sidebar = Sidebar.folderToSidebar(path)

        return {
            // rest of config options
            sidebar: [
              {
                title: "",
                collapsable: false,
                children: sidebar
              }
            ],
            //config options
        }
    }
    module.exports = init();

this will read all the markdown files in that folder and append to sidebar.

### read sidebar from YAML front matter in README.md

there is also an option to select which items to have in your sidebar.
You can specify in README.md for workdir

\---\
title: title\
sidebar: sideItem1, sideItem2, sideItem3\
\---

then in config.js

    let sidebar = getSidebar();

### Folder structure

```
project
|___.vuepress
|   |   config.js
|
|___post1
|   |   README.md
|
|___post2
|   |   README.md
|
|___post3
|   |   README.md
|
|   package.json
|   README.md
|
```

currently subfolders are not supported.

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