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

@ -95,7 +95,7 @@ slug: /
This page will be the home page when users visit https://example.com/.
```
:::caution
:::warning
If you added `slug: /` to a doc to make it the homepage, you should delete the existing homepage at `./src/pages/index.js`, or else there will be two files mapping to the same route!

View file

@ -29,7 +29,7 @@ If you build a cross-platform mobile SDK, you may have 2 documentations:
In this case, you can use a distinct docs plugin instance per mobile SDK documentation.
:::caution
:::warning
If each documentation instance is very large, you should rather create 2 distinct Docusaurus sites.
@ -55,7 +55,7 @@ Suppose you have 2 documentations:
In this case, you should use the same plugin twice in your site configuration.
:::caution
:::warning
`@docusaurus/preset-classic` already includes a docs plugin instance for you!

View file

@ -408,7 +408,7 @@ To make it **easier to adopt**, Docusaurus supports **multiple number prefix pat
By default, Docusaurus will **remove the number prefix** from the doc id, title, label, and URL paths.
:::caution
:::warning
**Prefer using [additional metadata](#autogenerated-sidebar-metadata)**.

View file

@ -392,7 +392,7 @@ module.exports = {
};
```
:::caution
:::warning
When a category has `collapsed: true` but `collapsible: false` (either through `sidebars.js` or through plugin configuration), the latter takes precedence and the category is still rendered as expanded.

View file

@ -11,7 +11,7 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
```
:::caution
:::warning
Think about it before starting to version your documentation - it can become difficult for contributors to help improve it!