RustyCMS: File-based headless CMS with REST API, admin UI, multilingual support
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
56
types/img.json5
Normal file
56
types/img.json5
Normal file
@@ -0,0 +1,56 @@
|
||||
{
|
||||
// Corresponds to CF_ComponentImg / Contentful_Img.ts (Asset/Image)
|
||||
name: "img",
|
||||
description: "Image asset with URL, filename and optional dimensions",
|
||||
tags: ["asset", "media"],
|
||||
category: "components",
|
||||
fields: {
|
||||
title: {
|
||||
type: "string",
|
||||
required: true,
|
||||
description: "Image title",
|
||||
},
|
||||
description: {
|
||||
type: "string",
|
||||
description: "Alt text / description",
|
||||
},
|
||||
file: {
|
||||
type: "object",
|
||||
required: true,
|
||||
description: "File: url (required), fileName, contentType, details (size, image.width/height)",
|
||||
fields: {
|
||||
url: {
|
||||
type: "string",
|
||||
required: true,
|
||||
description: "Image file URL",
|
||||
},
|
||||
fileName: {
|
||||
type: "string",
|
||||
description: "Filename",
|
||||
},
|
||||
contentType: {
|
||||
type: "string",
|
||||
description: "e.g. image/jpeg",
|
||||
},
|
||||
details: {
|
||||
type: "object",
|
||||
description: "Size and dimensions",
|
||||
fields: {
|
||||
size: {
|
||||
type: "integer",
|
||||
description: "File size in bytes",
|
||||
},
|
||||
image: {
|
||||
type: "object",
|
||||
description: "Image dimensions",
|
||||
fields: {
|
||||
width: { type: "integer", description: "Width in px" },
|
||||
height: { type: "integer", description: "Height in px" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user