Schema concepts
Schema concepts for Built.js themes and plugins.
In a Built.js theme or plugin, a schema defines the fields used in:
This means that you can select the fields you want for any of these and when the site is built, it will come with a Sanity CMS which includes the fields you defined. The easiest way to configure schemas is through the Theme/Plugin Design in the Built Studio. A content type can have the following data types:
bigintegerbooleandatedecimalemailenumerationfloatimageintegerjsonpasswordrelationportabletextstringtexttime
Element, global, and section content types can also have the above-mentioned fields, except:
relation, because a relation field defines the relationship (e.g. "one to many") between content types only.uid, because this is used for slugs of content types only.
Find out more about data types.
When you export your theme or plugin from the studio, a schemas directory will be created in the public/data directory with the following JSON files:
Each of these JSON files will have a fields object which will contain the definitions, like this: