/custom-type-with-slices.json Secret
Created
December 20, 2021 10:40
Star
You must be signed in to star a gist
The JSON for a simple example Custom Type in Prismic, with two Slices.
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
{ | |
"Main": { | |
"uid": { | |
"type": "UID", | |
"config": { | |
"label": "UID", | |
"placeholder": "hello-world" | |
} | |
}, | |
"body": { | |
"type": "Slices", | |
"fieldset": "Slice zone", | |
"config": { | |
"labels": null, | |
"choices": { | |
"text_slice": { | |
"type": "Slice", | |
"fieldset": "Text Slice", | |
"description": "A simple text slice.", | |
"icon": "format_color_text", | |
"display": "list", | |
"non-repeat": { | |
"key_text": { | |
"type": "Text", | |
"config": { | |
"label": "Key Text" | |
} | |
} | |
}, | |
"repeat": {} | |
}, | |
"image_gallery_slice": { | |
"type": "Slice", | |
"fieldset": "Image Gallery Slice", | |
"description": "Some text and images.", | |
"icon": "image", | |
"display": "list", | |
"non-repeat": { | |
"gallery_title": { | |
"type": "Text", | |
"config": { | |
"label": "Gallery Title" | |
} | |
} | |
}, | |
"repeat": { | |
"gallery_image": { | |
"type": "Image", | |
"config": { | |
"constraint": { | |
"width": 300, | |
"height": 300 | |
}, | |
"thumbnails": [], | |
"label": "Gallery Image" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment