docs: formally document how admonitions can be customized (#7799)

This commit is contained in:
Joshua Chen 2022-07-20 18:57:12 +08:00 committed by GitHub
parent e912e536c8
commit 09326bd456
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 53 additions and 23 deletions

View file

@ -180,26 +180,6 @@ module.exports = {
};
```
In addition to these plugins and themes, `@docusaurus/theme-classic` adds [`remark-admonitions`](https://github.com/elviswolcott/remark-admonitions) as a remark plugin to `@docusaurus/plugin-content-blog` and `@docusaurus/plugin-content-docs`.
The `admonitions` key will be passed as the [options](https://github.com/elviswolcott/remark-admonitions#options) to `remark-admonitions`. Passing `false` will prevent the plugin from being added to MDX.
```js title="docusaurus.config.js"
module.exports = {
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
// options for remark-admonitions
admonitions: {},
},
},
],
],
};
```
### Installing presets {#installing-presets}
A preset is usually an npm package, so you install them like other npm packages using npm.