/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 sitesGatsbyDeveloper.code-workspace
file in VSCodeyarn install
at the root of the repoyarn build
to create the dist
folder and copy the files overFor most cases you shouldn't need to do node debugging.
yarn watch
in the root folder. This will compile typescript react components as you type.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.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.
pathPrefix
is set correctly in gatsby-config.js
in the site you're testing.yarn build
in the root folder. This command includes --prefix-paths
which is required for the pathPrefix to work.yarn serve
in the root folder. This will serve the site locally at http://localhost:9000/MYPREFIX
and 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 the theme/package.json
version number manually.yarn npm login
- Log into NPMyarn workspace @riverscapes/gatsby-theme npm publish
/theme/src/images
folder) you will need to run yarn build
again to copy them into the dist
folder. Any other image in the sites
folder should build automatically