Discussion about getting started with Sanity.io and creating content models using the Studio

21 replies
Last updated: Jul 10, 2020
hey all! I'm new to sanity.io . just signed up like 5 minutes ago, but I can't seem to get started. I've been using Contentful for years, but in Sanity I keep going in circles trying to get started--it seems most of the links in the app link to separate domainsin
https://manage.sanity.io/
if I click Getting Started it takes me to
https://www.sanity.io/docs/introduction/getting-started If I click docs it takes me to
http://www.sanity.io/docs if I click
sanity.io i takes me to the home page https://www.sanity.io/
The UX is a bit of a disaster...

Can't I do anything else in
manage.sanity.io or it's just a menu of links?I want to create a model for my content. Doesn't
Sanity.io have any UI for creating a content model? Do we have to do it entirely with some API or CLI?
We already have a Gridsome deployment for our homepage and pricing page. We plan to integrate a headless-CMS so we can create a set of landing pages.
So I don't want to start with your Gridsome Blog. We already have a site.
I guess the only way to make process is to ask my engineers to do something with your CLI?

In Contentful, I can start by creating a content model and work on my content first, then Contentful provides an API which the devs can use to create a content pipeline in the app.

But with Sanity it seems like I can't even get started until we have an app in place? Can't your product managers see the benefits of the Contentful approach?
Jul 9, 2020, 4:33 PM
Hey max,
So sanity is different from Contentful where the content editor is a WYSIWYG and hosted there.

You start sanity project using the CLI or using one of their starters
Jul 9, 2020, 4:43 PM
so is there no WYSIWYG at all?
Jul 9, 2020, 4:43 PM
what's the point of Sanity? I might as well just start with my own database.
Jul 9, 2020, 4:44 PM
The content models are coded in the Studio
Jul 9, 2020, 4:44 PM
I came from Contentful as well and I had the same thinkinng about Sanity. Cause I thought thta’s too much work to code the content models.
Jul 9, 2020, 4:44 PM
But Sanity’s approach is really powerful once you get the hang of it
Jul 9, 2020, 4:45 PM
The content models are coded in the Studio
not really sure what that means... can you elaborate
Jul 9, 2020, 4:45 PM
so you do have to create the models in code?
Jul 9, 2020, 4:45 PM
after you create them, does it provide a WYSIWYG UI for managing the content?
Jul 9, 2020, 4:45 PM
Yes. It’s a full blown content editor. Here’s what the Sanity Studio looks like.
Jul 9, 2020, 4:46 PM
thanks. But how can I get started? We already have a Gridsome project, so I don't want to create a new product using their "Gridsome blog". We were planning to integrate with our existing app.
In Contentful, I can start by creating a content model and work on my content first, then Contentful provides an API which the devs can use to create a content pipeline in the app.

But with Sanity it seems like I can't even get started until we create a starter project? Can't their product managers see the benefits of the Contentful approach?
Jul 9, 2020, 4:50 PM
The panels that you see on the left are customizable, so you can have different workflow depending on your use case . It’s similar to Contentful’s views but you have a lot more control on how they look.
Jul 9, 2020, 4:50 PM
I agree with you that Contentful has an easier “getting started” approach. I also had the same issues with you so I put off Sanity for awhile.
I do think Sanity will benefit from having a getting started tutorial with just the Sanity Studio that will take you to creating your first content model. Not just relying on the starters.

I’m sure the
user Y
and team are working on making this experience better.
Anyway, they suggest to start with one of the starters first to get familiar with how Sanity’s content modeling works and other things.

I know you already have an existing project, but you can use the starter to learn about Sanity and then start a clean Sanity project using the CLI once you’re ready.
Jul 9, 2020, 5:00 PM
thanks for all the help Vince.
So basically instead of adding Sanity to my project, I should create a sanity project and then add my project to the new sanity app?
Jul 9, 2020, 5:01 PM
You can do either way! The CLI can create a project folder for you where the studio lives. You can have it on the same repo as your main app, if you want a monorepo. Or you can have it as a standalon app.
Jul 9, 2020, 5:04 PM
And then you can host it on Sanity or Netlify or wherever.
Jul 9, 2020, 5:04 PM
Let me know if you have any questions or hit any roadblocks. I’m still new to Sanity as well so I definitely had the same pain points as you! But once you’re past that learning curve, it’s gonna be hard to back to Contentful haha
Jul 9, 2020, 5:10 PM
Sorry for the sub-optimal experience
user D
– and thanks for pitching in
user N
🙌
We’ll definitively improve the onboarding and make navs more consistent and helpful!

So, Sanity is basically a hosted NoSQL real-time database for JSON documents + an open source React based CMS that you can customize and host anywhere. There are some conscious design choses behind having the content models as code, partly because of the customizeability and because we think that data models is first and foremost a developer concern that should be possible to put into version control, bootstrap and so on. That being said, it’s not impossible to build a point-and-click solution on top of it, and there may be more “just add water” experiences down the road.

If you want to initiate a project inside of an existing project you can install the CLI (as Vince says) with
npm -g @sanity/cli
and run
sanity init
. It will let you create a project (i.e. the datastore) and download the studio code locally so you can set it up. This video takes you through the first steps: https://www.youtube.com/watch?v=2ceM_tSus_M
If you want to just have your studio quickly available on the internet, run the
sanity deploy
command inside the studio folder to build and deploy it on
<your-name>.sanity.studio
. You can also deploy it on Vercel, Netlify, or wherever you can host a index.html and a app.js file (The studio is a React SPA).
And do let us know if we can help you and where the docs are lacking. Hugely appreciated!
Jul 9, 2020, 5:20 PM
Sorry for the sub-optimal experience
user D
– and thanks for pitching in
user N
🙌
We’ll definitively improve the onboarding and make navs more consistent and helpful!

So, Sanity is basically a hosted NoSQL real-time database for JSON documents + an open source React based CMS that you can customize and host anywhere. There are some conscious design choses behind having the content models as code, partly because of the customizeability and because we think that data models is first and foremost a developer concern that should be possible to put into version control, bootstrap and so on. That being said, it’s not impossible to build a point-and-click solution on top of it, and there may be more “just add water” experiences down the road.

If you want to initiate a project inside of an existing project you can install the CLI (as Vince says) with
npm -g @sanity/cli
and run
sanity init
. It will let you create a project (i.e. the datastore) and download the studio code locally so you can set it up. This video takes you through the first steps: https://www.youtube.com/watch?v=2ceM_tSus_M
If you want to just have your studio quickly available on the internet, run the
sanity deploy
command inside the studio folder to build and deploy it on
<your-name>.sanity.studio
. You can also deploy it on Vercel, Netlify, or wherever you can host a index.html and a app.js file (The studio is a React SPA).
And do let us know if we can help you and where the docs are lacking. Hugely appreciated!
Jul 9, 2020, 5:20 PM
user Y
thanks, we are making progress.wanted to see if this still works:
``tasty treats``
Cheers!
Jul 10, 2020, 1:36 PM
DM me your project ID
user D
:)
Jul 10, 2020, 2:15 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?