This repository is a gatsby theme, that can be used/installed as a gatsby plugin in an other gatsby project.
Gatsby theme take advantage of yarn
and its workspace
feature, to
offer ease of development.
To develop locally on the theme, run the following commands from the root of this repository:
git clone <this-repo-git-url>
cd <the-repo-we-just-cloned>
yarn workspace example install
yarn workspace example develop
When the example is running, it will use the theme folder (inside this repository), as a gatsby module
This repository, has two projects in two folders, the theme, and a theme example.
This directory is the theme package itself, with all code and default configuration.
gatsby-theme-w3f/
gatsby-config.js
: gatsby-config, starting point of theme functionalitiesindex.js
: Since themes also function as plugins, this is an empty file that gatsby needs to use this theme as a plugin.package.json
: theme dependencies.gatsby
should be apeerDependency
.
To develop on the theme, you have to develop through the
example
workspace/project.
This is an example usage of the theme, also used to develop on the theme.
example/
gatsby-config.js
: Specifies the theme that is used, the plugins, and their configurationsrc/
: Source code such as one-off pages or components that might live in a user's site.
You can run the example project with:
yarn workspace example develop