Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c0c8875

Browse files
authored
feat(gatsby-recipes): document option support for GatsbyPlugin (gatsbyjs#23599)
for support added in gatsbyjs#23433
1 parent b24d802 commit c0c8875

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

packages/gatsby-recipes/README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,22 @@ To run a remote recipe, just paste in the path to the recipe e.g. `gatsby recipe
122122

123123
Installs a Gatsby Plugin in the site's `gatsby-config.js`.
124124

125-
Soon will support options.
126-
127125
```jsx
128-
<GatsbyPlugin name="gatsby-plugin-emotion" />
126+
<GatsbyPlugin
127+
name="gatsby-source-filesystem"
128+
key="src/pages"
129+
options={{
130+
name="src pages directory"
131+
path="src/pages"
132+
}}
133+
/>
129134
```
130135

131136
##### props
132137

133138
- **name** name of the plugin
139+
- **options** object with options to be added to the plugin declaration in `gatsby-config.js`. JavaScript code is not _yet_ supported in options e.g. `process.env.API_TOKEN`. This is being worked on. For now only simple values like strings and numbers are supported.
140+
- **key** string used to distinguish between multiple plugin instances
134141

135142
#### `<GatsbyShadowFile>`
136143

0 commit comments

Comments
 (0)