RustyCMS: File-based headless CMS with REST API, admin UI, multilingual support
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
75
types/post.json5
Normal file
75
types/post.json5
Normal file
@@ -0,0 +1,75 @@
|
||||
{
|
||||
// Equivalent to: CF_Post extends CF_Content, CF_SEO
|
||||
name: "post",
|
||||
description: "Blog post with layout, SEO and optional tags",
|
||||
tags: ["content", "blog"],
|
||||
category: "content",
|
||||
extends: [
|
||||
"content_layout",
|
||||
"seo"
|
||||
],
|
||||
fields: {
|
||||
slug: {
|
||||
type: "string",
|
||||
required: true,
|
||||
unique: true
|
||||
},
|
||||
linkName: {
|
||||
type: "string",
|
||||
required: true
|
||||
},
|
||||
icon: {
|
||||
type: "string"
|
||||
},
|
||||
headline: {
|
||||
type: "string",
|
||||
required: true
|
||||
},
|
||||
subheadline: {
|
||||
type: "string"
|
||||
},
|
||||
excerpt: {
|
||||
type: "string",
|
||||
maxLength: 500,
|
||||
description: "Short summary for previews"
|
||||
},
|
||||
created: {
|
||||
type: "datetime",
|
||||
auto: true,
|
||||
readonly: true
|
||||
},
|
||||
postImage: {
|
||||
type: "reference",
|
||||
collection: "img",
|
||||
description: "Featured image"
|
||||
},
|
||||
postTag: {
|
||||
type: "array",
|
||||
items: {
|
||||
type: "reference",
|
||||
collection: "tag"
|
||||
},
|
||||
description: "Associated tags"
|
||||
},
|
||||
important: {
|
||||
type: "boolean",
|
||||
required: true,
|
||||
default: false,
|
||||
description: "Mark post as important"
|
||||
},
|
||||
date: {
|
||||
type: "datetime",
|
||||
description: "Optional display date"
|
||||
},
|
||||
content: {
|
||||
type: "markdown",
|
||||
required: true,
|
||||
description: "Post body (Markdown)"
|
||||
},
|
||||
showCommentSection: {
|
||||
type: "boolean",
|
||||
default: true,
|
||||
description: "Show comment section (default: true)"
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user