mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-01 10:22:30 +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
|
@ -1,6 +1,6 @@
|
|||
# Plugin Method References
|
||||
|
||||
:::caution
|
||||
:::warning
|
||||
|
||||
This section is a work in progress. Anchor links or even URLs are not guaranteed to be stable.
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ module.exports = function (context, options) {
|
|||
|
||||
Register an extra command to enhance the CLI of Docusaurus. `cli` is a [commander](https://www.npmjs.com/package/commander/v/5.1.0) object.
|
||||
|
||||
:::caution
|
||||
:::warning
|
||||
|
||||
The commander version matters! We use commander v5, and make sure you are referring to the right version documentation for available APIs.
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ This function permits one to create some global plugin data that can be read fro
|
|||
|
||||
This data becomes accessible to your client-side/theme code through the [`useGlobalData`](../../docusaurus-core.mdx#useGlobalData) and [`usePluginData`](../../docusaurus-core.mdx#usePluginData) hooks.
|
||||
|
||||
:::caution
|
||||
:::warning
|
||||
|
||||
Global data is... global: its size affects the loading time of all pages of your site, so try to keep it small. Prefer `createData` and page-specific data whenever possible.
|
||||
|
||||
|
@ -157,7 +157,7 @@ export default function friendsPlugin(context, options) {
|
|||
|
||||
Modifies the internal webpack config. If the return value is a JavaScript object, it will be merged into the final config using [`webpack-merge`](https://github.com/survivejs/webpack-merge). If it is a function, it will be called and receive `config` as the first argument and an `isServer` flag as the second argument.
|
||||
|
||||
:::caution
|
||||
:::warning
|
||||
|
||||
The API of `configureWebpack` will be modified in the future to accept an object (`configureWebpack({config, isServer, utils, content})`)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue