Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

clerk/clerk-gatsby-starter

Repository files navigation

Clerk - Gatsby starter

This repository shows how to add Clerk to a Gatsby app.

You can find its live demo at https://starter.gatsby.clerk.app.

Under the hood

This starter uses gatsby-plugin-clerk, which wraps ClerkProvider around the whole app. With that, you can start using components from @clerk/clerk-react — such as SignedIn and SignedOut — on the root of your app.

Running the starter locally

  1. Fork and clone this repository
  2. Install dependencies: yarn install
  3. Add your API keys as environment variables to a file called .env.development:
    1. Set the "Frontend API" variable: echo "GATSBY_CLERK_FRONTEND_API_URL=YOUR_FRONTEND_API_URL" >> .env.development
    2. Set the "API key" variable: echo "CLERK_API_KEY=YOUR_API_KEY" >> .env.development
  4. Run the app: yarn start

Need help?

If you need any assistance, we're happy to help you out!