0

I am trying to setup sanity in a Svelte & Routify project. was wondering if having an entire thing for sanity is necessary, I know you can publish the studio to .sanity.io, wondering why isn't everything online in the first place and not somethings local

GHOST
  • 94
  • 3
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Sep 28 '21 at 23:48

1 Answers1

2

Developing your studio locally allows you to make and test incremental changes. Other developers on your team can work from their own local studios and make their own changes as well. The deployed studio might be the tool used by members of your team who aren't developing the studio itself but are accessing or editing the content. They can work from that studio without seeing (potentially breaking) changes as they're being made, which would be the case if everything was edited online.

If you're familiar with how git works, you can think of a repo like you might have on GitHub. You can work on your repo locally—saving as you go by committing. No one else on your team can see these changes and they don't impact the remote repo. That's your local studio. Once you push your commits to GitHub, they're accessible to the rest of your team. That's your deployed studio.

Geoff Ball
  • 743
  • 3
  • 14
  • That makes sense thank you! So is it recommended to have sanity and your web frontend in a monorepo or is it recommended to have sanity as a folder in your project? Also will the local studio automatically get published or do you need to use the deploy command? – GHOST Sep 23 '21 at 13:37
  • I like to keep my front end and studio in separate folders but in the same repo (rather than the studio as a subfolder of the front end code). If you're hosting the studio with Sanity, you'll run `sanity deploy` when you want to update your hosted studio. If you host the studio yourself, you can deploy when you push to your repo (https://www.sanity.io/docs/deployment#ed3cd78ea4eb). – Geoff Ball Oct 03 '21 at 15:25
  • Thank you! Will try this – GHOST Oct 04 '21 at 19:33