mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-08 05:42:34 +02:00
docs: versioning docs should show example versioned sidebar files (#9500)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com> Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
e68ef88336
commit
be5b5c660f
1 changed files with 31 additions and 0 deletions
|
@ -145,6 +145,37 @@ versioned_sidebars/version-1.0.0-sidebars.json
|
||||||
</Tabs>
|
</Tabs>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
:::tip
|
||||||
|
|
||||||
|
Versioned sidebar files are, like standard sidebar files, relative to the content root for the given version — so for the example above, your versioned sidebar file may look like:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"sidebar": [
|
||||||
|
{
|
||||||
|
"type": "autogenerated",
|
||||||
|
"dirName": "."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
or for a manual sidebar:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"sidebar": [
|
||||||
|
{
|
||||||
|
"type": "doc",
|
||||||
|
"id": "new",
|
||||||
|
"label": "New"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
### Updating an existing version {#updating-an-existing-version}
|
### Updating an existing version {#updating-an-existing-version}
|
||||||
|
|
||||||
You can update multiple docs versions at the same time because each directory in `versioned_docs/` represents specific routes when published.
|
You can update multiple docs versions at the same time because each directory in `versioned_docs/` represents specific routes when published.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue