mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-31 18:07:00 +02:00
fix(theme): make warning a first-class admonition, and deprecate caution admonition (#9308)
This commit is contained in:
parent
58be496da2
commit
f5ae537d3e
339 changed files with 666 additions and 515 deletions
|
@ -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!
|
||||
|
||||
|
|
|
@ -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!
|
||||
|
||||
|
|
|
@ -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)**.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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!
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue