mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-06 21:03:47 +02:00
refactor(v2): change plugin format within docusaurus.config.js
to be like plugins (#1568)
* refactor(v2): change plugin format within `docusaurus.config.js` to be like presets * docs(v2): mention customizing CSS
This commit is contained in:
parent
0226b892bd
commit
6a905dd736
11 changed files with 221 additions and 242 deletions
|
@ -18,17 +18,15 @@ Then you add it in your site's `docusaurus.config.js` plugin arrays:
|
|||
```jsx
|
||||
module.exports = {
|
||||
plugins: [
|
||||
{
|
||||
module: '@docusaurus/plugin-content-pages',
|
||||
},
|
||||
{
|
||||
'@docusaurus/plugin-content-pages',
|
||||
[
|
||||
// Plugin with options
|
||||
module: '@docusaurus/plugin-content-blog',
|
||||
options: {
|
||||
'@docusaurus/plugin-content-blog',
|
||||
{
|
||||
include: ['*.md', '*.mdx'],
|
||||
path: 'blog',
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
};
|
||||
```
|
||||
|
@ -39,11 +37,7 @@ Docusaurus can also load plugins from your local directory, you can do something
|
|||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
{
|
||||
module: path.resolve(__dirname, '/path/to/docusaurus-local-plugin'),
|
||||
},
|
||||
],
|
||||
plugins: [path.resolve(__dirname, '/path/to/docusaurus-local-plugin')],
|
||||
};
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue