Skip to content

Instantly share code, notes, and snippets.

@Wolfr
Created December 30, 2018 16:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Wolfr/9c5512d26a1d910cfc1ac0d3fe1f5bac to your computer and use it in GitHub Desktop.
Save Wolfr/9c5512d26a1d910cfc1ac0d3fe1f5bac to your computer and use it in GitHub Desktop.
export default {
title: "Film",
name: "film",
type: "document",
fields: [
{
title: "Name",
name: "name",
type: "string",
},
{
title: "IMDB Link",
name: "imdbLink",
type: "url",
},
{
title: "Trailer link",
name: "trailerLink",
type: "url",
},
{
title: "Image",
name: "image",
type: "image",
}
]
}
// First, we must import the schema creator
import createSchema from 'part:@sanity/base/schema-creator'
// Then import schema types from any plugins that might expose them
import schemaTypes from 'all:part:@sanity/base/schema-type'
// Then we give our schema to the builder and provide the result to Sanity
export default createSchema({
name: 'default',
types: schemaTypes.concat([
film
])
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment