fix(theme): make warning a first-class admonition, and deprecate caution admonition (#9308)

This commit is contained in:
Sébastien Lorber 2023-09-15 10:48:21 +02:00 committed by GitHub
parent 58be496da2
commit f5ae537d3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
339 changed files with 666 additions and 515 deletions

View file

@ -11,13 +11,13 @@ Docusaurus Plugin to generate **client-side redirects**.
This plugin will write additional HTML pages to your static site that redirect the user to your existing Docusaurus pages with JavaScript.
:::caution production only
:::warning production only
This plugin is always inactive in development and **only active in production** because it works on the build output.
:::
:::caution
:::warning
It is better to use server-side redirects whenever possible.

View file

@ -9,7 +9,7 @@ import APITable from '@site/src/components/APITable';
Provides the [Blog](blog.mdx) feature and is the default blog plugin for Docusaurus.
:::caution some features production only
:::warning some features production only
The [feed feature](../../blog.mdx#feed) works by extracting the build output, and is **only active in production**.

View file

@ -19,7 +19,7 @@ If you are still using this plugin with a `UA-*` tracking id, you should create
:::
:::caution production only
:::warning production only
This plugin is always inactive in development and **only active in production** to avoid polluting the analytics statistics.

View file

@ -15,7 +15,7 @@ You can use [Google's Tag Assistant](https://tagassistant.google.com/) tool to c
:::
:::caution production only
:::warning production only
This plugin is always inactive in development and **only active in production** to avoid polluting the analytics statistics.

View file

@ -15,7 +15,7 @@ You can use [Google's Tag Assistant](https://tagassistant.google.com/) tool to c
:::
:::caution production only
:::warning production only
This plugin is always inactive in development and **only active in production** to avoid polluting the analytics statistics.

View file

@ -36,7 +36,7 @@ import thumbnail from './path/to/img.png';
<Image img={require('./path/to/img.png')} />
```
:::caution
:::warning
This plugin registers a [Webpack loader](https://webpack.js.org/loaders/) that changes the type of imported/require images:

View file

@ -90,7 +90,7 @@ By default, offline mode is enabled when the site is installed as an app. See th
After the site has been precached, the service worker will serve cached responses for later visits. When a new build is deployed along with a new service worker, the new one will begin installing and eventually move to a waiting state. During this waiting state, a reload popup will show and ask the user to reload the page for new content. Until the user either clears the application cache or clicks the `reload` button on the popup, the service worker will continue serving the old content.
:::caution
:::warning
Offline mode / precaching requires downloading all the static assets of the site ahead of time, and can consume unnecessary bandwidth. It may not be a good idea to activate it for all kind of sites.
@ -124,7 +124,7 @@ Strategies used to turn the offline mode on:
- `saveData`: activates for users with `navigator.connection.saveData === true`
- `always`: activates for all users
:::caution
:::warning
Use this carefully: some users may not like to be forced to use the offline mode.

View file

@ -9,7 +9,7 @@ import APITable from '@site/src/components/APITable';
This plugin creates sitemaps for your site so that search engine crawlers can crawl your site more accurately.
:::caution production only
:::warning production only
This plugin is always inactive in development and **only active in production** because it works on the build output.