Skip to content

Instantly share code, notes, and snippets.

@samlfair
Created December 20, 2021 10:40
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save samlfair/aea7bd65450aed8df9c55a092adec1a6 to your computer and use it in GitHub Desktop.
The JSON for a simple example Custom Type in Prismic, with two Slices.
{
"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