Skip to content

Commit 36cb890

Browse files
LBLaurie Barth
andauthored
Make a note about duplicate behavior in theme authoring (#23055)
Co-authored-by: Laurie Barth <laurie@LauriesrkLaptop.fios-router.home>
1 parent b969dc4 commit 36cb890

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/tutorial/building-a-theme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,8 @@ exports.createPages = async ({ actions, graphql, reporter }, options) => {
10471047
}
10481048
```
10491049

1050+
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.
1051+
10501052
> 💡 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`.
10511053
10521054
Test out this new options-setting by making some adjustments to `site`.

0 commit comments

Comments
 (0)