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:
Yangshun Tay 2019-06-05 21:35:54 -07:00 committed by GitHub
parent 0226b892bd
commit 6a905dd736
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 221 additions and 242 deletions

View file

@ -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')],
};
```