docs: added file structure docs for sidebar (fixes #1083) (#1261)

* Added file structure docs for sidebar

* More specificity added

Co-authored-by: Anix <anik220798@gmail.com>

* More specificity added

Co-authored-by: Anix <anik220798@gmail.com>

Co-authored-by: Anix <anik220798@gmail.com>
This commit is contained in:
Anirudh Emmadi 2020-07-07 00:30:19 -05:00 committed by GitHub
parent 2a52460a59
commit 0268594f90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,6 +51,18 @@ Create the `_sidebar.md`:
You need to create a `.nojekyll` in `./docs` to prevent GitHub Pages from ignoring files that begin with an underscore.
!> Docsify only looks for `_sidebar.md` in the current folder, and uses that, otherwise it falls back to the one configured using `window.$docsify.loadSidebar` config.
Example file structure:
```text
└── docs/
├── _sidebar.md
├── index.md
├── getting-started.md
└── running-services.md
```
## Nested Sidebars
You may want the sidebar to update with only navigation to reflect the current directory. This can be done by adding a `_sidebar.md` file to each folder.