Created
December 30, 2018 16:14
-
-
Save Wolfr/9c5512d26a1d910cfc1ac0d3fe1f5bac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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