mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 10:20:09 +02:00
docs(v2): update sidebar migration from v1 to v2 guide (#1845)
* update docs for sidebar.json in migration from v1 to v2 This change is regarding an issue opened at here https://github.com/facebook/docusaurus/issues/1841 * removed duplicates in migration doc * Update migrating-from-v1-to-v2.md
This commit is contained in:
parent
f4c0c85669
commit
b82e211546
1 changed files with 16 additions and 0 deletions
|
@ -357,6 +357,22 @@ The following fields are all deprecated, you may remove from your configuration
|
|||
|
||||
We intend to implement many of the deprecated config fields as plugins in future. Help will be appreciated!
|
||||
|
||||
## Migrate your sidebar
|
||||
|
||||
In previous version, nested sidebar category is not allowed and sidebar category can only contain doc id. However, v2 allows infinite nested sidebar and we have many types of [Sidebar Item](sidebar.md#sidebar-item) other than document.
|
||||
|
||||
You'll have to migrate your sidebar if it contains category type. Rename `subcategory` to `category` and `ids` to `items`.
|
||||
|
||||
```js
|
||||
{
|
||||
- type: 'subcategory',
|
||||
+ type: 'category',
|
||||
label: 'My Example Subcategory',
|
||||
+ items: ['doc1'],
|
||||
- ids: ['doc1']
|
||||
},
|
||||
```
|
||||
|
||||
## Delete footer file
|
||||
|
||||
`website/core/Footer.js` is no longer needed. If you want to modify the default footer provided by docusaurus, [swizzle](using-themes.md#swizzling-theme-components) it:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue