For an overview of the project structure please refer to the Gatsby documentation - Building with Components.
- A recent version of Node.js
- Npm: https://www.npmjs.com/get-npm
- Yarn
Clone the git repository:
git clone git@github.com:CivicActions/civicactions.com.gitGo to the top level directory:
cd civicactionsMake sure that you have the Gatsby CLI program installed:
npm install --global gatsby-cliAnd run from your CLI:
yarnFire up the development server:
cd gatsby-example-site
gatsby developYou should see the site by going to http://localhost:8000/ in your browser.
To turn off the server run Ctrl + C
To collaborate on this project first follow the install steps above to create a functional sandbox.
- Fork this repo to your github account.
- In your CLI, add this main repo as a remote named origin
git remote add origin git@github.com:CivicActions/civicactions.com.git
- Add your fork as a remote named myfork (or any preferred name)
git remote add myfork [link used to clone your fork]
- Create a new local branch with the naming convention
CA-xx(ticket number)-brief-ticket-titleand commit your changes to the ticket branch. - After working, run
git pull --rebase origin masterto pull in the latest changes. - Run
npm installto update the site with any new plugins. - Run
gatsby developto make sure the site builds as expected. - Push your changes to your fork
git push myfork. - Create a PR in the main repo.
To deploy the current work in the master branch run:
npm run deploy
This will push updated changes to the origin/gh-pages branch which updates the static page.