Skip to main content

Blog example

The blog example is a collection of content type schemas used to implement a blog. These schemas are used as examples in the webhook and search guides. These schemas are also part of our own blog.

Pre-requisites
Link copied!

You should register the other schemas in the blog section if you want to use it with the webhook and search examples.

How to use
Link copied!

Once you've registered the schemas on this page, you should be able to walk through the webhook and search guides.

Blog post
Link copied!

This is the main blog post content type schema. It includes links to example-author, example-text, example-image and example-video. Note that many of the properties are required.

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://schema-examples.com/blogpost",
"title": "Blog post",
"description": "A blog post",
"allOf": [
{
"$ref": "http://bigcontent.io/cms/schema/v1/core#/definitions/content"
}
],
"type": "object",
"properties": {
"title": {
"title": "Title",
"description": "Used for heading and SEO title tag",
"type": "string",
"minLength": 1,
"maxLength": 150
},
"date": {
"title": "Creation date",
"description": "Creation date (YYYY-MM-DD)",
"type": "string",
"maxLength": 10,
"minLength": 10
},
"description": {
"title": "Description",
"description": "Used for blog listing page and SEO description",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"image": {
"title": "Image",
"description": "Used for the blog post's thumbnail and banner",
"allOf": [
{
"$ref": "http://bigcontent.io/cms/schema/v1/core#/definitions/content-link"
},
{
"properties": {
"contentType": {
"enum": ["https://schema-examples.com/example-image"]
}
}
}
]
},
"urlSlug": {
"title": "Url slug",
"description": "Url friendly slug",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"tags": {
"title": "Tags",
"description": "Blog tags",
"type": "array",
"minItems": 0,
"maxItems": 10,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"title": "Tag",
"description": ""
}
},
"readTime": {
"title": "Read time",
"description": "The time it takes to read the blog",
"type": "integer"
},
"authors": {
"title": "Blog author",
"description": "Article author(s) - max 3",
"type": "array",
"minItems": 1,
"maxItems": 3,
"items": {
"allOf": [
{
"$ref": "http://bigcontent.io/cms/schema/v1/core#/definitions/content-link"
},
{
"properties": {
"contentType": {
"enum": ["https://schema-examples.com/example-author"]
}
}
}
]
}
},
"content": {
"title": "Content",
"description": "",
"type": "array",
"minItems": 1,
"maxItems": 20,
"items": {
"allOf": [
{
"$ref": "http://bigcontent.io/cms/schema/v1/core#/definitions/content-link"
},
{
"properties": {
"contentType": {
"title": "Content",
"enum": [
"https://schema-examples.com/example-image",
"https://schema-examples.com/example-video",
"https://schema-examples.com/example-text"
]
}
}
}
]
}
}
},
"propertyOrder": [
"title",
"authors",
"date",
"description",
"image",
"urlSlug",
"tags",
"readTime",
"content"
],
"required": [
"title",
"authors",
"date",
"description",
"image",
"urlSlug",
"readTime",
"content"
]
}

Example image
Link copied!

example-image is used for images added to the blog-post and also example-author.

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://schema-examples.com/example-image",
"title": "Image",
"description": "Image schema",
"allOf": [
{
"$ref": "http://bigcontent.io/cms/schema/v1/core#/definitions/content"
}
],
"type": "object",
"properties": {
"image": {
"title": "Image",
"description": "insert an image",
"type": "object",
"anyOf": [
{
"$ref": "http://bigcontent.io/cms/schema/v1/core#/definitions/image-link"
}
]
},
"altText": {
"type": "string",
"minLength": 1,
"maxLength": 150,
"title": "Alt text",
"description": "insert image alt text"
}
},
"propertyOrder": ["image", "altText"],
"required": ["image", "altText"]
}

Example video
Link copied!

example-video is used to add a video to the blog post.

It allows a video to be chosen from the Content Hub video library.

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://schema-examples.com/example-video",
"title": "Video",
"description": "Video schema",
"allOf": [
{
"$ref": "http://bigcontent.io/cms/schema/v1/core#/definitions/content"
}
],
"type": "object",
"properties": {
"video": {
"title": "Video",
"type": "object",
"anyOf": [
{
"$ref": "http://bigcontent.io/cms/schema/v1/core#/definitions/video-link"
}
]
}
},
"propertyOrder": ["video"],
"required": ["video"]
}

Example text
Link copied!

example-text is used for the blog post text. Each item can contain up to 3000 characters in rich text format.

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://schema-examples.com/example-text",
"title": "Text",
"description": "Text schema",
"allOf": [
{
"$ref": "http://bigcontent.io/cms/schema/v1/core#/definitions/content"
}
],
"type": "object",
"properties": {
"text": {
"type": "string",
"format": "markdown",
"title": "Text",
"description": "",
"minLength": 1,
"maxLength": 30000
}
},
"propertyOrder": ["text"],
"required": ["text"]
}

Example author
Link copied!

example-author is used for the blog post author, including the name and an image.

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://schema-examples.com/example-author",
"title": "Author",
"description": "Author schema",
"allOf": [
{
"$ref": "http://bigcontent.io/cms/schema/v1/core#/definitions/content"
}
],
"type": "object",
"properties": {
"name": {
"title": "Author name",
"description": "Name of the author",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"avatar": {
"title": "Avatar",
"description": "The author's avatar",
"type": "object",
"allOf": [
{
"$ref": "http://bigcontent.io/cms/schema/v1/core#/definitions/content-link"
},
{
"properties": {
"contentType": {
"title": "image",
"enum": ["https://schema-examples.com/example-image"]
}
}
}
]
}
},
"propertyOrder": ["name", "avatar"],
"required": ["name"]
}

Content form preview
Link copied!

An example of creating a content item using a content type registered from the blog post example schema is shown in the image below.

This includes content items author and blog text and image content items.

Adding a content item from the blog post example schema

Webhook integration guides- search

Search overview page