119 lines
2.8 KiB
Plaintext
119 lines
2.8 KiB
Plaintext
{
|
||
name: "demo",
|
||
description: "Demo content type – documents all supported field types (kept in version control as example).",
|
||
tags: [
|
||
"content"
|
||
],
|
||
category: "content",
|
||
fields: {
|
||
title: {
|
||
type: "string",
|
||
required: true,
|
||
description: "string – single line (required)",
|
||
},
|
||
summary: {
|
||
type: "string",
|
||
description: "string – single line, optional",
|
||
},
|
||
css: {
|
||
type: "string",
|
||
widget: "code",
|
||
codeLanguage: "css",
|
||
description: "string + widget: code, codeLanguage: css – code field with syntax highlighting and copy",
|
||
},
|
||
singleSelect: {
|
||
type: "string",
|
||
enum: [
|
||
"A",
|
||
"B",
|
||
"C"
|
||
],
|
||
description: "string + enum – single-value dropdown (Select)",
|
||
},
|
||
count: {
|
||
type: "number",
|
||
description: "number – floating point",
|
||
},
|
||
quantity: {
|
||
type: "integer",
|
||
description: "integer – whole number",
|
||
},
|
||
isActive: {
|
||
type: "boolean",
|
||
description: "boolean – checkbox, true/false",
|
||
},
|
||
publishedAt: {
|
||
type: "datetime",
|
||
description: "datetime – ISO 8601 date-time",
|
||
},
|
||
bodyRichtext: {
|
||
type: "richtext",
|
||
description: "richtext – rich text editor",
|
||
},
|
||
bodyHtml: {
|
||
type: "html",
|
||
description: "html – HTML content",
|
||
},
|
||
bodyMarkdown: {
|
||
type: "markdown",
|
||
description: "markdown – Markdown content",
|
||
},
|
||
bodyTextOrRef: {
|
||
type: "textOrRef",
|
||
description: "textOrRef – inline text or file:path to load from file",
|
||
},
|
||
tags: {
|
||
type: "multiSelect",
|
||
enum: [
|
||
"news",
|
||
"tutorial",
|
||
"announcement"
|
||
],
|
||
description: "multiSelect + enum – checkboxes, value is string[]",
|
||
},
|
||
labels: {
|
||
type: "array",
|
||
items: {
|
||
type: "string"
|
||
},
|
||
description: "array – items type string (list of strings)",
|
||
},
|
||
scores: {
|
||
type: "array",
|
||
items: {
|
||
type: "number"
|
||
},
|
||
description: "array – items type number",
|
||
},
|
||
relatedPages: {
|
||
type: "array",
|
||
items: {
|
||
type: "reference",
|
||
collection: "page"
|
||
},
|
||
description: "array – items type reference (slugs to page collection)",
|
||
},
|
||
meta: {
|
||
type: "object",
|
||
fields: {
|
||
key: {
|
||
type: "string"
|
||
},
|
||
value: {
|
||
type: "string"
|
||
},
|
||
},
|
||
description: "object – fixed sub-fields (key, value)",
|
||
},
|
||
mainImage: {
|
||
type: "reference",
|
||
collection: "img",
|
||
description: "reference – single slug to collection (e.g. img)",
|
||
},
|
||
relatedPage: {
|
||
type: "referenceOrInline",
|
||
collection: "page",
|
||
description: "referenceOrInline – slug ref or inline object (collection must exist)",
|
||
},
|
||
},
|
||
} |