mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-02 11:47:23 +02:00
add documentation regarding usage of nested docs + git ignore .idea (#860)
* add documentation regarding usage of nested docs + add .idea in .gitignore * Remove 1.3.3, move to navigation & simplify wording * add documentation for docusaurus >= v1.2.0 a well
This commit is contained in:
parent
aa1f82649c
commit
22f3a85a49
3 changed files with 45 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,5 +1,6 @@
|
|||
.DS_Store
|
||||
.vscode
|
||||
.idea
|
||||
*.code-workspace
|
||||
|
||||
node_modules
|
||||
|
|
|
@ -72,6 +72,28 @@ Or you can create a new category within the sidebar:
|
|||
}
|
||||
```
|
||||
|
||||
However, for a document located in a docs subdirectory like below:
|
||||
|
||||
```bash
|
||||
docs
|
||||
└── dir1
|
||||
└── getting-started.md
|
||||
```
|
||||
|
||||
You should provide `directory/id` instead of `id` in `sidebars.json`.
|
||||
|
||||
```js
|
||||
{
|
||||
"docs": {
|
||||
"My New Sidebar Category": [
|
||||
"dir1/getting-started"
|
||||
],
|
||||
...
|
||||
},
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
### Adding New Sidebars
|
||||
|
||||
You can also put a document in a new sidebar. In the following example, we are creating an `examples-sidebar` sidebar within `sidebars.json` that has a category called `My Example Category` containing a document with an `id` of `my-examples`.
|
||||
|
|
|
@ -73,6 +73,28 @@ Or you can create a new category within the sidebar:
|
|||
}
|
||||
```
|
||||
|
||||
However, for a document located in a docs subdirectory like below:
|
||||
|
||||
```bash
|
||||
docs
|
||||
└── dir1
|
||||
└── getting-started.md
|
||||
```
|
||||
|
||||
You should provide `directory/id` instead of `id` in `sidebars.json`.
|
||||
|
||||
```js
|
||||
{
|
||||
"docs": {
|
||||
"My New Sidebar Category": [
|
||||
"dir1/getting-started"
|
||||
],
|
||||
...
|
||||
},
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
### Adding New Sidebars
|
||||
|
||||
You can also put a document in a new sidebar. In the following example, we are creating an `examples-sidebar` sidebar within `sidebars.json` that has a category called `My Example Category` containing a document with an `id` of `my-examples`.
|
||||
|
|
Loading…
Add table
Reference in a new issue