How to work with Sanity CMS
Update the Sanity schema
The Sanity schema files are in the src/sanity/schemas/documents
folder, you can change the schema to your own schema, or add new schema, then add the new schema to the src/sanity/schemas/index.ts
file.
After you update the Sanity schema, you need to run the following command to generate the types:
Update the GROQ queries
The GROQ queries are in the src/sanity/lib/queries.ts
file, you can change the GROQ queries to your own queries, or add new queries to the file.
After you update the GROQ queries, you need to run the following command to generate the types:
Configure the Sanity Studio
The configuration of the Sanity Studio is in the sanity.config.ts
file, you can customize the Sanity Studio to your own needs.
For example, you can find a new Sanity Plugin and add it to the Sanity Studio.
You can also change the default layout structure, according to the Sanity Structure Builder.