Last active
January 11, 2017 00:49
-
-
Save michaelgodshall/91f30de72f368b817f88b8db1cbeab24 to your computer and use it in GitHub Desktop.
Prismic.io Custom Type Example
This file contains 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
{ | |
"Project" : { | |
"client" : { | |
"type" : "Link", | |
"fieldset" : "Details", | |
"config" : { | |
"placeholder" : "Client", | |
"select" : "document", | |
"customtypes" : [ "client" ] | |
} | |
}, | |
"title" : { | |
"type" : "StructuredText", | |
"config" : { | |
"placeholder" : "Project Title/Role", | |
"single" : "heading1" | |
} | |
}, | |
"uid" : { | |
"type" : "UID", | |
"config" : { | |
"placeholder" : "project-title-slug" | |
} | |
}, | |
"overview" : { | |
"type" : "StructuredText", | |
"config" : { | |
"placeholder" : "Project overview", | |
"multi" : "em, strong" | |
} | |
}, | |
"question" : { | |
"type" : "StructuredText", | |
"config" : { | |
"placeholder" : "Question", | |
"multi" : "em, strong" | |
} | |
}, | |
"hero_image" : { | |
"fieldset" : "Images", | |
"type" : "Image", | |
"config" : { | |
"placeholder" : "Hero Image", | |
"constraint" : { | |
"width" : 2200, | |
"height" : 1200 | |
}, | |
"thumbnails" : [ { | |
"name" : "large", | |
"width" : 1100, | |
"height" : 600 | |
}, { | |
"name" : "medium", | |
"width" : 800, | |
"height" : 600 | |
}, { | |
"name" : "list-tall", | |
"width" : 740, | |
"height" : 860 | |
}, { | |
"name" : "list-wide", | |
"width" : 740, | |
"height" : 530 | |
}, { | |
"name" : "list-squat", | |
"width" : 740, | |
"height" : 660 | |
}, { | |
"name" : "banner-large", | |
"width" : 1520, | |
"height" : 500 | |
}, { | |
"name" : "banner-small", | |
"width" : 760, | |
"height" : 250 | |
} ] | |
} | |
}, | |
"list_image" : { | |
"type" : "Image", | |
"config" : { | |
"placeholder" : "List Image", | |
"constraint" : { | |
"width" : 740, | |
"height" : 860 | |
}, | |
"thumbnails" : [ { | |
"name" : "list-wide", | |
"width" : 740, | |
"height" : 530 | |
}, { | |
"name" : "list-squat", | |
"width" : 740, | |
"height" : 660 | |
} ] | |
} | |
} | |
}, | |
"Content" : { | |
"content" : { | |
"type" : "Slices", | |
"config" : { | |
"labels" : { | |
"heading" : [ { | |
"name" : "1-col", | |
"display" : "1 Column" | |
}, { | |
"name" : "2-col", | |
"display" : "2 Columns" | |
} ], | |
"text" : [ { | |
"name" : "1-col", | |
"display" : "1 Column" | |
}, { | |
"name" : "2-col", | |
"display" : "2 Columns" | |
} ], | |
"image" : [ { | |
"name" : "1-col", | |
"display" : "1 Column" | |
}, { | |
"name" : "2-col", | |
"display" : "2 Columns" | |
} ], | |
"quote" : [ { | |
"name" : "1-col", | |
"display" : "1 Column" | |
}, { | |
"name" : "2-col", | |
"display" : "2 Columns" | |
} ], | |
"stat" : [ { | |
"name" : "1-col", | |
"display" : "1 Column" | |
}, { | |
"name" : "2-col", | |
"display" : "2 Columns" | |
} ], | |
"carousel" : [ { | |
"name" : "full-width", | |
"display" : "Full-width View" | |
}, { | |
"name" : "multi-tile", | |
"display" : "Multi Tile View" | |
} ] | |
}, | |
"choices" : { | |
"heading" : { | |
"type" : "StructuredText", | |
"fieldset" : "Heading", | |
"config" : { | |
"multi" : "heading3, heading4, heading5, heading6", | |
"placeholder" : "Section Heading..." | |
} | |
}, | |
"text" : { | |
"type" : "StructuredText", | |
"fieldset" : "Text", | |
"config" : { | |
"multi" : "strong, em, hyperlink" | |
} | |
}, | |
"image" : { | |
"type" : "Group", | |
"fieldset" : "Image", | |
"config" : { | |
"repeat" : false, | |
"fields" : { | |
"image" : { | |
"type" : "Image", | |
"config" : { | |
"constraint" : { | |
"width" : 2200, | |
"height" : 1200 | |
}, | |
"thumbnails" : [ { | |
"name" : "large", | |
"width" : 1100, | |
"height" : 600 | |
}, { | |
"name" : "medium", | |
"width" : 800, | |
"height" : 600 | |
}, { | |
"name" : "diptych", | |
"width" : 740, | |
"height" : 850 | |
} ] | |
} | |
}, | |
"caption" : { | |
"type" : "StructuredText", | |
"config" : { | |
"multi" : "em, strong", | |
"placeholder" : "Image caption..." | |
} | |
} | |
} | |
} | |
}, | |
"carousel" : { | |
"type" : "Group", | |
"fieldset" : "Image Carousel", | |
"config" : { | |
"repeat" : true, | |
"fields" : { | |
"image" : { | |
"type" : "Image", | |
"config" : { | |
"constraint" : { | |
"width" : 2200, | |
"height" : 1200 | |
}, | |
"thumbnails" : [ { | |
"name" : "large", | |
"width" : 1100, | |
"height" : 600 | |
}, { | |
"name" : "medium", | |
"width" : 800, | |
"height" : 600 | |
}, { | |
"name" : "tile", | |
"width" : 1000, | |
"height" : 950 | |
} ] | |
} | |
}, | |
"caption" : { | |
"type" : "StructuredText", | |
"config" : { | |
"multi" : "em, strong", | |
"placeholder" : "Image caption..." | |
} | |
} | |
} | |
} | |
}, | |
"video" : { | |
"type" : "Embed", | |
"fieldset" : "Video", | |
"config" : { | |
"placeholder" : "Paste a link from YouTube, Vimeo, or other OEmbed supporting service" | |
} | |
}, | |
"quote" : { | |
"type" : "Link", | |
"fieldset" : "Quote", | |
"config" : { | |
"placeholder" : "Quote", | |
"select" : "document", | |
"customtypes" : [ "quote" ] | |
} | |
}, | |
"stat" : { | |
"type" : "Link", | |
"fieldset" : "Stat", | |
"config" : { | |
"placeholder" : "Stat", | |
"select" : "document", | |
"customtypes" : [ "stat" ] | |
} | |
} | |
} | |
} | |
} | |
}, | |
"Social Cards" : { | |
"facebook" : { | |
"fieldset" : "Facebook Card", | |
"type" : "Group", | |
"config" : { | |
"repeat" : false, | |
"fields" : { | |
"title" : { | |
"type" : "Text", | |
"config" : { | |
"label" : "Title" | |
} | |
}, | |
"description" : { | |
"type" : "Text", | |
"config" : { | |
"label" : "Description" | |
} | |
}, | |
"image" : { | |
"type" : "Image", | |
"config" : { | |
"placeholder" : "Image" | |
} | |
} | |
} | |
} | |
}, | |
"twitter" : { | |
"fieldset" : "Twitter Card", | |
"type" : "Group", | |
"config" : { | |
"repeat" : false, | |
"fields" : { | |
"title" : { | |
"type" : "Text", | |
"config" : { | |
"label" : "Title" | |
} | |
}, | |
"description" : { | |
"type" : "Text", | |
"config" : { | |
"label" : "Description" | |
} | |
}, | |
"image" : { | |
"type" : "Image", | |
"config" : { | |
"placeholder" : "Image" | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment