Extending, modifying, and deploying the schema
For the example used in this book, we will be creating a news and events website. The first step in this process is to create a file named event.js
in the document
directory, which will represent our event schema.
The event schema
The following code segment is the schema for an event, illustrating its various fields:
export default { name: 'event', type: 'document', title: 'Event', fields: [ { name: 'name', type: 'string', title: 'Name' }, { name: 'dateAndTime', type: 'datetime', title: 'Date and Time' ...