We are happy to announce Docusaurus 2.4.
The upgrade should be easy: as explained in our release process documentation, minor versions respect Semantic Versioning.
Highlights
Sidebar item description
In #8236, we made it possible to provide a new description
attribute for docs sidebar items of type link
and category
.
[
{
type: 'link',
label: 'Link with description',
href: 'https://docusaurus.io',
description: 'Some link description',
},
{
type: 'category',
label: 'Category with description',
description: 'Some category description',
items: [],
},
];
These descriptions will be used in category generated index pages.
Theme Query String
In #8708, we added the possibility to force Docusaurus to initialize itself in light
or dark
mode through a new docusaurus-theme
query-string parameter.
This is useful to ensure a consistent theme when embedding an existing Docusaurus page into an iframe or WebView.
Remark plugin npm2yarn upgrade
In #8690, we upgraded our Remark plugin @docusaurus/remark-plugin-npm2yarn with many conversion bug fixes, first-class support for pnpm, and the ability to register custom converters producing new tabs.
Run these commands!
```bash npm2yarn
npm install
npm run build
npm run myCustomScript -- --some-arg
```
- npm
- Yarn
- pnpm
npm install
npm run build
npm run myCustomScript -- --some-arg
yarn install
yarn build
yarn myCustomScript --some-arg