Skip to content
A starter that sets up yarn workspaces and an example usage of the minimum possible theme to speed up starting new themes
Branch: master
Clone or download
Latest commit 3ba5cab Mar 14, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
example Fix package name Mar 14, 2019
yarn.lock up deps Mar 14, 2019

Gatsby Starter Theme

Gatsby starter for creating a theme

gatsby new my-theme
cd my-theme
yarn workspace gatsby-theme-minimal-example develop


➜ tree . -L 2 -I node_modules
├── gatsby-theme-minimal
│   ├──
│   ├── gatsby-config.js
│   ├── index.js
│   └── package.json
├── example
│   ├──
│   ├── gatsby-config.js
│   ├── package.json
│   └── src
├── package.json
└── yarn.lock

3 directories, 10 files


This directory is the theme package itself. You should rename this at some point to be gatsby-theme-my-theme-name. Also change the package.json name field and the corresponding dependency in the example directory's package.json/gatsby-config.js.

  • gatsby-theme-minimal/
    • gatsby-config.js An empty gatsby-config that you can use as a starting point for building functionality into your theme.
    • index.js Since themes also function as plugins, this is an empty file that gatsby needs to use this theme as a plugin.
    • package.json The dependencies that your theme will pull in when people install it. gatsby should be a peerDependency.


This is an example usage of your theme. It should look the same as the site of someone who installed and used your theme from npm.

  • example/
    • gatsby-config.js Specifies which theme to use and any other one-off config a site might need.
    • src/ source code such as one-off pages or components that might live in a user's site.

You can run the example with:

yarn workspace example start
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.