To start developing your own theme using this repo as a starting point:
gatsby new my-theme https://github.com/shetharp/gatsby-theme-candor
cd my-theme
yarn
yarn workspace demo develop
To create a Gatsby site with the theme itself as a starting point:
- Follow the installation instructions for gatsby-theme-candor
๐จ View Demo Site โ
This theme workspace comes pre-loaded with the following:
Configurations for Typescript, ESLint, and Husky
yarn lint
to manually run ESLintyarn lint:fix
to manually run ESLint and auto-fix most issuesyarn type-check
to run the Typescript compiler- Note: Husky will run
yarn lint:fix
on staged files during pre-commit, and it will runyarn type-check
on all files during pre-push
theme
workspace
- Sources pages and posts from two seprate directories
- MDX support with frontmatter querying and referencing
- Syntax highlighting for code blocks in MDX
- Responsive optimized images
- A custom theme built with
gatsby-plugin-theme-ui
- Documented code and type-checking with Typescript
demo
workspace
- Consumes the theme and builds a site with example content
- Has a Blog Index page to view a list of all the pages in the demo site
- Has a Theme Preview page to view the theme in action
- Has a Theme JSON page to view the raw theme JSON
- Ample examples of component Shadowing in Gatsby
This directory is the theme package itself. You should change the
package.json
name field and the corresponding dependency in the
example directory's package.json
/gatsby-config.js
to match the chosen name.
This is an demo usage of your theme. It should look the same as the site of someone who installed and used your theme from npm.
You can run the example with:
yarn workspace demo develop
Learn more about how this theme was developed: TODO