Skip to content

Getting Started

If you’re a developer looking to get started on the Grief Matters website. We’re happy to have you here. Read on!

Clone and run the project

Clone the repo

Direct access

If you have direct access to the repo you can just clone the repo and get started.

  1. Navigate to the https://github.com/grief-matters/whygriefmatters.org
  2. Clone the repo using your preferred method

Start from a fork

  1. Navigate to the https://github.com/grief-matters/whygriefmatters.org repo
  2. Fork the repo to your personal GitHub account
  3. Clone the fork you just created
  4. It’s a good idea to sync your fork with our upstream repo to make sure you keep up with changes

Build and Run

  1. cd into the project directory on your local machine

  2. In order to run the project for local dev you’ll need to add a .dev.vars file to the root of the project with the contents (replacing the secrets with the keys you’ve been given):

    Terminal window
    SANITY_AUTH_TOKEN="sk[token]"
    CLERK_SECRET_KEY="sk_test_[key]"
  3. In order to build the project locally using npm run build (e.g. to test the site still builds prior to PR) you’ll need to add a .env file to the root project with the contents:

    Terminal window
    # Sanity Env Variables
    SANITY_STUDIO_API_VERSION="2023-07-16"
    SANITY_STUDIO_DATASET="production"
    SANITY_STUDIO_PROJECT_ID="vg3sb730"
    SANITY_AUTH_TOKEN="sk[token]"
    # Clerk Env Variables
    PUBLIC_CLERK_PUBLISHABLE_KEY="pk_test_[key]"
    CLERK_SECRET_KEY="sk_test_[key]"
  4. Ensure you have a recent LTS version of Node installed. If you use NVM there is a .nvmrc file in the project so you can just run nvm use to switch to a version you know the project supports.

  5. At the root of the project run npm install to install all dependencies

  6. Finally, run npm run dev to build an run the project in development mode

  7. If everything worked as expected you should see the project running at http://localhost:4321