Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion docs/docs/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,36 @@ module.exports = {
};
```

Plugins can take options. Note that plugin options will be stringified by Gatsby, so they cannot be functions.
Plugins can take options. Examples:

```javascript
module.exports = {
plugins: [
'gatsby-plugin-react-helmet',
{
// standard plugin with options example
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/src/data/`,
name: 'data',
},
},
{
resolve: 'gatsby-plugin-offline',
// blank options, equivalent to string-only plugin
options: {
plugins: [],
},
},
{
resolve: `gatsby-transformer-remark`,
options: {
// plugins inside plugins, why not
plugins: [`gatsby-remark-smartypants`],
},
},
],
}
```

Note that plugin options will be stringified by Gatsby, so they cannot be functions.