Skip to content

mattweston/sveltekit-sanity-v3

 
 

Repository files navigation

Deploy with Vercel

Sveltekit x Sanity Studio v3

Hi there 👋! This is a repo for my talk on YouTube, from the Sanity.io Virtual Meetup - Autumn 2022.

Features

✨ Embedding Sanity V3 in a Sveltekit app

When I was working on a new project that involved Sveltekit and Sanity I got curious and wanted to know whether I could directly embed the Sanity Studio V3 (Release Candiate) into a SvelteKit app. I was living on the edge already, so I might as well embrace it 🌈

👀 Side-by-side Instant Content preview.

I also go over on how we use Sanity's Side-by-side Instant Content preview feature with Sveltekit. And how you can easily implement this in your own SvelteKit applications. The code (createPreviewSubscriptionStore) is mostly inspired from Sanity's toolkit for Next.js.

Learn more

Developing

Once you've created a project and installed dependencies with pnpm install. Make sure you have added all the environment variables (see env.example).

pnpm dev

# or start the server and open the app in a new browser tab
pnpm dev -- --open

Building & Previewing

To build the project, run:

pnpm build

To preview the build, run:

pnpm preview

About

A Sanity V3 x SvelteKit boilerplate (in the works) ✨

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 68.0%
  • Svelte 28.6%
  • JavaScript 1.8%
  • Other 1.6%