Creating a schema for single pages with a page builder in Sanity.io
I think you have so many questions about setup and structured content / the different schema types, you might want to watch some of our tutorials, so you can get a better understanding of using Sanity
🙂For example with
NextJS or other frameworks, we have a lot of videos you can watch here .
BTW: Object schema definition make it possible to reuse the configuration/definition in other parts of your schemas and embed them into the documents & other objects.
BUT:
objectscannot be referenced, only documents can, so content is not transferable from
obj->
obj. (unless you go through referencing a document and its content.
objectsbetter. Thanks Saskia! But I would definitely recommend watching tutorials first and following along. That's how I was able to get a grasp on Sanity.
[slug].tsxin your
./pagesfolder instead of adding it into
./pages/posts/[slug].tsxthe first solution will give you
domain/SPECIFIC_SLUGwhile the letter will give you
domain/posts/SPECIFIC_SLUGhope that helps in the meantime
https://hdoro.dev/learn-groq
Was this answer helpful?
Sanity – Build the way you think, not the way your CMS thinks
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.