Skip to content

Instantly share code, notes, and snippets.

@rascode
Created December 11, 2020 11:44
Show Gist options
  • Save rascode/fdc6067a6b3b78d3b387cef09d7b102b to your computer and use it in GitHub Desktop.
Save rascode/fdc6067a6b3b78d3b387cef09d7b102b to your computer and use it in GitHub Desktop.
Sanity.io - Reference Code
export default {
name: 'role',
type: 'document',
title: 'Role',
fieldsets: [
{name: 'duration', title: 'Duration', options:{columns: 2}}
],
fields: [
{title: 'Title', name: 'title', type: 'string'},
{title: 'Role', name: 'role', type: 'string'},
{title: 'Company', name: 'company', type: 'reference',to: [{type: 'company'}]},
{title: 'Start Date', name: 'startDate', type: 'date', fieldset: 'duration'},
{title: 'End Date',name: 'endDate', type: 'date', fieldset: 'duration'},
{title: 'Summary', name: 'summary', type: 'richText' }
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment