website/blog/releases/2.2/index.mdx
We are happy to announce Docusaurus 2.2.
The upgrade should be easy: as explained in our release process documentation, minor versions respect Semantic Versioning.
In #7490, we added support for Mermaid diagrams. This fills the gap between GitHub Flavored Markdown which also added support recently. You can create Mermaid diagrams using Markdown code blocks:
```mermaid
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Health check
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts
prevail!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
```
import BrowserWindow from '@site/src/components/BrowserWindow';
<BrowserWindow>
```mermaid
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Health check
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts
prevail!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
```
</BrowserWindow>
Make sure to check the documentation, and the more advanced examples
headTagsIn #8151, we added the ability to apply arbitrary HTML <head> tags to all pages of your site.
module.exports = {
headTags: [
{
tagName: 'link',
attributes: {
rel: 'icon',
href: '/img/docusaurus.png',
},
},
],
};
We did several accessibility improvements:
We made validation stricter and improved error messages:
siteConfig.url more strictly and with better error messageurl and baseUrl fail-safe and less sensitive to the presence or absence of a leading or trailing slashWe completed the default theme translation support for multiple languages:
:::tip
Completing theme translations is an ongoing effort and an easy way to contribute to Docusaurus. We add new theme features regularly, for which we often need new translations.
:::
Other notable changes include:
docusaurus swizzle CLI has a new --config optionCheck the 2.2.0 changelog entry for an exhaustive list of changes.