Skip to content

Commit 0268594

Browse files
aemmadianikethsaha
andauthored
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>
1 parent 2a52460 commit 0268594

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/more-pages.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ Create the `_sidebar.md`:
5151

5252
You need to create a `.nojekyll` in `./docs` to prevent GitHub Pages from ignoring files that begin with an underscore.
5353

54+
!> 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.
55+
56+
Example file structure:
57+
58+
```text
59+
└── docs/
60+
├── _sidebar.md
61+
├── index.md
62+
├── getting-started.md
63+
└── running-services.md
64+
```
65+
5466
## Nested Sidebars
5567

5668
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.

0 commit comments

Comments
 (0)