mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-02 08:19:07 +02:00
docs: create Docusaurus v2.1.0 release docs + changelog + release blog post (#8036)
This commit is contained in:
parent
55de3ea04b
commit
56feb41445
97 changed files with 265 additions and 68 deletions
BIN
website/blog/2022-09-01-docusaurus-2.1/img/doc-card-list.png
Normal file
BIN
website/blog/2022-09-01-docusaurus-2.1/img/doc-card-list.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 172 KiB |
BIN
website/blog/2022-09-01-docusaurus-2.1/img/social-card.png
Normal file
BIN
website/blog/2022-09-01-docusaurus-2.1/img/social-card.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 69 KiB |
85
website/blog/2022-09-01-docusaurus-2.1/index.mdx
Normal file
85
website/blog/2022-09-01-docusaurus-2.1/index.mdx
Normal file
|
@ -0,0 +1,85 @@
|
|||
---
|
||||
title: Docusaurus 2.1
|
||||
authors:
|
||||
- slorber
|
||||
tags: [release]
|
||||
image: ./img/social-card.png
|
||||
---
|
||||
|
||||
We are happy announce **Docusaurus 2.1**, our very first minor version release.
|
||||
|
||||
The upgrade should be easy: as explained in our [release process documentation](/community/release-process), minor versions respect [Semantic Versioning](https://semver.org/).
|
||||
|
||||

|
||||
|
||||
<!--truncate-->
|
||||
|
||||
## Highlights
|
||||
|
||||
### DocCardList improvements
|
||||
|
||||
In [#8008](https://github.com/facebook/docusaurus/pull/8008), we simplified the usage of the`<DocCardList>` component, that is notably used on sidebar category generated index pages.
|
||||
|
||||
The `items` prop is now optional, and will be automatically inferred from the content of the parent sidebar category:
|
||||
|
||||
```diff
|
||||
import DocCardList from '@theme/DocCardList';
|
||||
- import {useCurrentSidebarCategory} from '@docusaurus/theme-common';
|
||||
|
||||
- <DocCardList items={useCurrentSidebarCategory().items}/>
|
||||
+ <DocCardList/>
|
||||
```
|
||||
|
||||
Also, we made it possible to use it on any document, including regular docs not linked to any sidebar category.
|
||||
|
||||

|
||||
|
||||
### `noindex` improvements
|
||||
|
||||
We improved the support of the [`noindex` meta `robots` directive](https://developers.google.com/search/docs/advanced/crawling/block-indexing), a way to signal search engines you don't want a specific page to be indexed.
|
||||
|
||||
In [#7963](https://github.com/facebook/docusaurus/pull/7963), we allow `noindex` to be configured on a per-docs-version basis.
|
||||
|
||||
Use the following plugin options to tell crawlers you don't want the `1.0.0` version to be indexed:
|
||||
|
||||
```jsx
|
||||
const options = {
|
||||
versions: {
|
||||
'1.0.0': {
|
||||
noIndex: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
In practice, Docusaurus will add the following meta to each page of that version:
|
||||
|
||||
```html
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
```
|
||||
|
||||
In [#7964](https://github.com/facebook/docusaurus/pull/7964), we also fixed a bug where the sitemap plugin would still contain pages that have a `noindex` directive. Now the sitemap plugin will reliably filter out all the pages containing `noindex` directives.
|
||||
|
||||
### Overriding default meta tags
|
||||
|
||||
In [#7952](https://github.com/facebook/docusaurus/pull/7952), it becomes possible to override default html meta tags you couldn't before:
|
||||
|
||||
```jsx
|
||||
<>
|
||||
{siteConfig.noIndex && <meta name="robots" content="nofollow, noindex" />}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
</>
|
||||
```
|
||||
|
||||
It is now possible to use `<Head>` or `themeConfig.metadata`:
|
||||
|
||||
- to override the `viewport` meta
|
||||
- to override the `robots` meta: you could mark your site as `noIndex`, but except for specific pages that should be indexed
|
||||
|
||||
### Ukrainian translations
|
||||
|
||||
In [#7953](https://github.com/facebook/docusaurus/pull/7953), we added default classic theme translations for the Ukrainian language.
|
||||
|
||||
## Other changes
|
||||
|
||||
Check the [2.1.0 changelog entry](/changelog/2.1.0) for an exhaustive list of changes.
|
Loading…
Add table
Add a link
Reference in a new issue