{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "https://www.totalcms.co/schemas/blog.json",
	"id": "blog",
	"type": "object",
	"description": "A schema for a Total CMS Blog object",
	"formgrid": "id id\ntitle title\ndraft featured\ndate author\nimage image\ncategories categories\ntags tags\nsummary summary\ncontent content\nmedia media\ngallery gallery\nextra extra\nupdated created",
	"properties": {
		"draft": {
			"type"    : "boolean",
			"label"   : "Draft",
			"help"    : "Mark this post as a draft",
			"field"   : "checkbox",
			"default" : false
		},
		"featured": {
			"type"    : "boolean",
			"label"   : "Featured",
			"help"    : "Mark this post as featured",
			"field"   : "checkbox",
			"factory" : "boolean"
		},
		"id": {
			"$ref"     : "https://www.totalcms.co/schemas/properties/slug.json",
			"label"    : "Blog Post ID",
			"help"     : "A unique ID for this post. No spaces or special characters.",
			"field"    : "id",
			"factory"  : "slug",
			"settings" : {
				"autogen": "${title}"
			}
		},
		"title": {
			"type"    : "string",
			"label"   : "Title",
			"help"    : "Blog Post title",
			"field"   : "text",
			"factory" : "catchPhrase"
		},
		"date": {
			"$ref"    : "https://www.totalcms.co/schemas/properties/date.json",
			"label"   : "Date",
			"help"    : "Blog Post date",
			"field"   : "date",
			"default" : "now",
			"factory" : "iso8601"
		},
		"author": {
			"type"     : "string",
			"label"    : "Author",
			"help"     : "Author for this post",
			"field"    : "text",
			"factory"  : "name",
			"settings" : {
				"propertyOptions": true
			}
		},
		"summary": {
			"type"    : "string",
			"label"   : "Summary",
			"help"    : "Blog Post summary",
			"field"   : "styledtext",
			"factory" : "styledtext(1,3,false)"
		},
		"media": {
			"$ref"    : "https://www.totalcms.co/schemas/properties/url.json",
			"label"   : "Media",
			"help"    : "Media URL for this post",
			"field"   : "url",
			"factory" : "url"
		},
		"content": {
			"type"    : "string",
			"label"   : "Content",
			"help"    : "Main blog post content",
			"field"   : "styledtext",
			"factory" : "styledtext(1,8,true)"
		},
		"extra": {
			"type"    : "string",
			"label"   : "Extra Content",
			"help"    : "Extra content area for this post",
			"field"   : "styledtext",
			"factory" : "styledtext(0,3,true)"
		},
		"categories": {
			"$ref"     : "https://www.totalcms.co/schemas/properties/list.json",
			"label"    : "Categories",
			"help"     : "A list of categories for this post",
			"field"    : "list",
			"factory"  : "tags",
			"settings" : {
				"propertyOptions": true
			}
		},
		"tags": {
			"$ref"     : "https://www.totalcms.co/schemas/properties/list.json",
			"label"    : "Tags",
			"help"     : "A list of tags for this post",
			"field"    : "list",
			"factory"  : "tags",
			"settings" : {
				"propertyOptions": true
			}
		},
		"image": {
			"$ref"    : "https://www.totalcms.co/schemas/properties/image.json",
			"label"   : "Image",
			"help"    : "Main image for this post",
			"field"   : "image",
			"factory" : "imageShapes(1920,1080)"
		},
		"gallery": {
			"$ref"    : "https://www.totalcms.co/schemas/properties/gallery.json",
			"label"   : "Gallery",
			"help"    : "Gallery of images for this post",
			"field"   : "gallery",
			"factory" : "galleryShapes(5,1920,1080)"
		},
		"updated": {
			"$ref"     : "https://www.totalcms.co/schemas/properties/date.json",
			"label"    : "Updated Date",
			"help"     : "Blog Post updated date",
			"field"    : "datetime",
			"factory"  : "iso8601",
			"settings" : {
				"onUpdate": true,
				"readonly": true
			}
		},
		"created": {
			"$ref"     : "https://www.totalcms.co/schemas/properties/date.json",
			"label"    : "Creation Date",
			"help"     : "Blog Post creation date",
			"field"    : "datetime",
			"factory"  : "iso8601",
			"settings" : {
				"onCreate": true,
				"readonly": true
			}
		}
	},
	"required": [
		"id",
		"title",
		"updated",
		"created"
	],
	"index": [
		"id",
		"title",
		"image",
		"date",
		"draft",
		"featured",
		"author",
		"categories",
		"tags",
		"summary",
		"updated",
		"created"
	]
}