Skip to content

Commit

Permalink
docs: versioning docs should show example versioned sidebar files (#9500
Browse files Browse the repository at this point in the history
)

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
  • Loading branch information
3 people committed Nov 10, 2023
1 parent e68ef88 commit be5b5c6
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions website/docs/guides/docs/versioning.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit be5b5c6

Please sign in to comment.