Skip to content

Commit

Permalink
Make a note about duplicate behavior in theme authoring (#23055)
Browse files Browse the repository at this point in the history
Co-authored-by: Laurie Barth <laurie@LauriesrkLaptop.fios-router.home>
  • Loading branch information
LB and Laurie Barth authored Apr 13, 2020
1 parent b969dc4 commit 36cb890
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/tutorial/building-a-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,8 @@ exports.createPages = async ({ actions, graphql, reporter }, options) => {
}
```

Note that the example above sets default values for `options`. This behavior was also included in the prior `gatsby-config.js` example. You only need to set default values once, but both mechanisms for doing so are valid.

> 💡 Up till now, you've mostly worked in the `gatsby-theme-events` space. Because you've converted the theme to use a function export, you can no longer run the theme on its own. The function export in `gatsby-config.js` is only supported for themes. From now on you'll be running `site` -- the Gatsby site consuming `gatsby-theme-events`, instead. Gatsby sites still require the object export in `gatsby-config.js`.
Test out this new options-setting by making some adjustments to `site`.
Expand Down

0 comments on commit 36cb890

Please sign in to comment.