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:
Mikey O'Toole 2023-11-10 18:03:18 +00:00 committed by GitHub
parent e68ef88336
commit be5b5c660f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -145,6 +145,37 @@ versioned_sidebars/version-1.0.0-sidebars.json
</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}
You can update multiple docs versions at the same time because each directory in `versioned_docs/` represents specific routes when published.