text: export default {
    name: 'project',
    title: 'Project',
    type: 'document',
    fields: [
      {
        name: 'title',
        title: 'Title',
        type: 'string'
      },
      {
        name: 'slug',
        title: 'Slug',
        type: 'slug',
        options: {
          source: 'title',
          maxLength: 96
        }
      },
      {
        name: 'description',
        title: 'Description',
        type: 'text'
      },
      {
        name: 'body',
        title: 'Body',
        type: 'array',
        of: [{type: 'block'}]
      },
      {
        name: 'githubUrl',
        title: 'Github Url',
        type: 'url'
      },
      {
        name: 'siteUrl',
        title: 'Site Url',
        type: 'url'
      },
      {
        name: 'mainImage',
        title: 'Main image',
        type: 'image',
        options: {
          hotspot: true
        }
      },
      {
        name: 'tags',
        title: 'Tags',
        type: 'array',
        of: [{type: 'reference', to: {type: 'tag'}}]
      }
    ],
    preview: {
      select: {
        title: 'title',
        description: 'name',
        media: 'mainImage'
      },
      prepare(selection) {
        const {author} = selection
        return Object.assign({}, selection, {
          subtitle: author && `by ${author}`
        })
      }
    }
  }
  