Skip to content

Commit 64c4e5e

Browse files
johnoLBgatsbybot
authored
feat(docs): Official theme development workflow (#22177)
* feat(docs): Official theme development workflow Document the worlkflow for official theme development using the gatsby dev CLI. * Update docs/contributing/code-contributions.md Co-Authored-By: LB <[email protected]> * Improve theme workflow docs by using monorepo starter * Update docs/contributing/code-contributions.md Co-Authored-By: LB <[email protected]> * Update docs/contributing/code-contributions.md Co-Authored-By: LB <[email protected]> Co-authored-by: LB <[email protected]> Co-authored-by: gatsbybot <[email protected]>
1 parent f1bbefa commit 64c4e5e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/contributing/code-contributions.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ On this page:
1212
- [Contributing example sites](#contributing-example-sites)
1313
- [Using Docker to set up test environments](#using-docker-to-set-up-test-environments)
1414
- [Development tools](#development-tools)
15+
- [Official theme development](#official-theme-development)
1516

1617
## Repo setup
1718

@@ -119,6 +120,22 @@ Using Docker Compose, you can start and stop a WordPress instance and integrate
119120

120121
Check [Debugging the build process](/docs/debugging-the-build-process/) page to learn how to debug Gatsby.
121122

123+
## Official theme development
124+
125+
This section is for official theme development in Gatsby's monorepo. If you are looking
126+
to build your own theme, see [building themes](/docs/themes/building-themes/).
127+
128+
Before getting started, make sure that you have
129+
[set up your local dev environment](/contributing/setting-up-your-local-dev-environment/)
130+
and that you're on the latest version of `gatsby-dev-cli`.
131+
132+
- In the Gatsby monorepo find the starter in the `/starters` directory that uses the theme you want to work on
133+
- Navigate to that directory, e.g. `cd starters/gatsby-starter-blog-theme`
134+
- Install dependencies: `yarn`
135+
- Run Gatsby Dev CLI to sync theme files, referencing the appropriate theme: `gatsby-dev --packages gatsby-theme-blog`
136+
- In another tab run the starter: `yarn develop`
137+
- Edit the theme files, you'll see changes automatically copied over and update in your starter.
138+
122139
## Feedback
123140

124141
At any point during the contributing process the Gatsby team would love to help! For help with a specific problem you can [open an issue on GitHub](/contributing/how-to-file-an-issue/). Or drop in to [our Discord server](https://gatsby.dev/discord) for general community discussion and support.

0 commit comments

Comments
 (0)