Skip to content

SoneNiko/personal-website

Repository files navigation

Note

This starter features an /app and a /studio folder. The /app folder contains the frontend code, and the /studio folder contains the Sanity Studio code.

This is not a monorepo setup. put them both in one repository for the sake of simplicity.

Getting started

The following commands are meant to be run in both the /app and /studio folders.

  1. npm install to install dependencies
  2. npx -y sanity@latest init --env, this will:
  • ask you to select or create a Sanity project and dataset, use the same Sanity project and dataset in both folders.
  • output a .env file with appropriate variables
  • (or use sanity init --env if you have the CLI installed)
  1. Prefix your environment variables in the SvelteKit /app folder with PUBLIC_, they should be PUBLIC_SANITY_DATASET and PUBLIC_SANITY_PROJECT_ID.
  2. npm run dev to start the development server