mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-02 00:09:48 +02:00
docs(v2): Add documentation for docs multi-instance support (#3978)
* Add documentation for docs multi-instance support * Add documentation for docs multi-instance support
This commit is contained in:
parent
cf086abe20
commit
d5d6e2fba2
4 changed files with 236 additions and 8 deletions
|
@ -78,9 +78,11 @@ module.exports = {
|
|||
|
||||
## Multi-instance plugins and plugin ids
|
||||
|
||||
It is possible to use multiple times the same plugin, on the same Docusaurus website.
|
||||
All Docusaurus content plugins can support multiple plugin instances.
|
||||
|
||||
In this case, it is required to assign a unique id to each plugin instance.
|
||||
The Docs plugin has [additional multi-instance documentation](./guides/docs/docs-multi-instance.mdx)
|
||||
|
||||
It is required to assign a unique id to each plugin instance.
|
||||
|
||||
By default, the plugin id is `default`.
|
||||
|
||||
|
@ -105,6 +107,12 @@ module.exports = {
|
|||
};
|
||||
```
|
||||
|
||||
:::note
|
||||
|
||||
At most one plugin instance can be the "default plugin instance", by omitting the `id` attribute, or using `id: 'default'`.
|
||||
|
||||
:::
|
||||
|
||||
## Plugins design
|
||||
|
||||
Docusaurus' implementation of the plugins system provides us with a convenient way to hook into the website's lifecycle to modify what goes on during development/build, which involves (but not limited to) extending the webpack config, modifying the data being loaded and creating new components to be used in a page.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue