- The demo site can be seen HERE: https://riverscapes.github.io/riverscapes-gatsby-theme/
- The Feature explainer and styleguide is here: https://riverscapes.github.io/riverscapes-gatsby-theme/demo/
/theme@riverscapes/gatsby-theme- The theme that is used to build the site./sites/template@riverscapes/developer-site- Working copy of the gatsby site to help debug problems and test new versions/sites/template@riverscapes/template-clean- Clean template to use when creating new sites
- Clone the repo
- Open the
GatsbyDeveloper.code-workspacefile in VSCode - In a terminal run
yarn installat the root of the repo - Run
yarn buildto create thedistfolder and copy the files over
For most cases you shouldn't need to do node debugging.
- In one terminal window run
yarn watchin the root folder. This will compile typescript react components as you type. - In a separate terminal window
yarn start. This will start the gatsby developer site (@riverscapes/developer-site) in development mode. It will watch for changes and reload the browser automatically. - (Optional) In VSCode navigate to the "Run and Debug" sidebar and select "Debug Using Chrome". This will allow you to set breakpoints in the browser and debug the react components.
Testing pathPrefixes locally
If you're planning to use a pathPrefix in order to run Gatsby in a domain's subfolder you may notice some broken links and need to test it locally.
- Make sure
pathPrefixis set correctly ingatsby-config.jsin the site you're testing. - Run
yarn buildin the root folder. This command includes--prefix-pathswhich is required for the pathPrefix to work. - Run
yarn servein the root folder. This will serve the site locally athttp://localhost:9000/MYPREFIXand you can test the links.
In some very rare cases there will be an issue with gatsby-node.js or some graphql problem that you need to debug at the node level. In this case you will need to run "Debug Gatsby Node API" from the "Run and Debug" sidebar. This will start the gatsby site in debug mode with NODE breakpoints enabled and allow you to set breakpoints in the node code. THEMEING AND REACT WORK SHOULD NOT NEED THIS.
yarn workspace @riverscapes/gatsby-theme version patch(You can use patch or minor or major as appropriate). Also you can just edit thetheme/package.jsonversion number manually.- Git commit and push all package.json changes
yarn npm login- Log into NPMyarn workspace @riverscapes/gatsby-theme npm publish
- If you add or change the location of theme images (just images in the
/theme/src/imagesfolder) you will need to runyarn buildagain to copy them into thedistfolder. Any other image in thesitesfolder should build automatically