sveltekit-sanity-v3 Svelte Themes

Sveltekit Sanity V3

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

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

Top categories

Loading Svelte Themes