Skip to content

Instantly share code, notes, and snippets.

@faresd
Created November 20, 2015 15:18
Show Gist options
  • Save faresd/69d4160a5eb7ba5cfd5f to your computer and use it in GitHub Desktop.
Save faresd/69d4160a5eb7ba5cfd5f to your computer and use it in GitHub Desktop.
Post custom type for documentation
{
"Blog Post" : {
"uid" : {
"type" : "UID",
"config" : {
"placeholder" : "unique-identifier-for-blog-post-url"
}
},
"body" : {
"fieldset" : "Post content",
"type" : "Slices",
"config" : {
"choices" : {
"text" : {
"type" : "StructuredText",
"fieldset" : "Text",
"config" : {
"multi" : "paragraph, heading1, heading2, heading3, strong, em, hyperlink",
"placeholder" : "Post text..."
}
},
"quote" : {
"type" : "StructuredText",
"fieldset" : "Quote",
"config" : {
"placeholder" : "Post quote...",
"single" : "paragraph"
}
},
"image-with-caption" : {
"type" : "Group",
"fieldset" : "Post image and caption",
"config" : {
"fields" : {
"illustration" : {
"type" : "Image"
},
"caption" : {
"type" : "StructuredText",
"config" : {
"single" : "heading3",
"placeholder" : "Image caption..."
}
}
}
}
}
}
}
}
},
"Metadata" : {
"author" : {
"fieldset" : "Author",
"type" : "Text"
},
"date" : {
"fieldset" : "Post properties",
"type" : "Date",
"config" : {
"label" : "Post date"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment