Presets are collections of plugins and themes.
A preset is usually a npm package, so you install them like other npm packages using npm.
Then, add it in your site's
To load presets from your local directory, specify how to resolve them:
Presets -> Themes and Plugins
Presets in some way are a shorthand function to add plugins and themes to your docusaurus config. For example, you can specify a preset that includes the following themes and plugins,
then in your Docusaurus config, you may configure the preset instead:
This is equivalent of doing:
This is especially useful when some plugins and themes are intended to be used together.
The classic preset that is usually shipped by default to new docusaurus website. It is a set of plugins and themes.
To specify plugin options individually, you can provide the necessary fields to certain plugins, i.e.
@docusaurus/theme-classic, pass them in the preset field, like this:
In addition to these plugins and themes,
remark-admonitions as a remark plugin to
admonitions key will be passed as the options to
false will prevent the plugin from being added to MDX.