RustyCMS: File-based headless CMS with REST API, admin UI, multilingual support
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
61
types/campaign.json5
Normal file
61
types/campaign.json5
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
// Corresponds to CF_Campaign / Contentful_Campaign.ts
|
||||
name: "campaign",
|
||||
description: "Campaign with URL pattern and optional content",
|
||||
tags: ["marketing", "config"],
|
||||
category: "config",
|
||||
fields: {
|
||||
campaignName: {
|
||||
type: "string",
|
||||
required: true,
|
||||
description: "Campaign name",
|
||||
},
|
||||
urlPattern: {
|
||||
type: "string",
|
||||
required: true,
|
||||
description: "URL pattern (e.g. regex) for campaign usage",
|
||||
},
|
||||
selector: {
|
||||
type: "string",
|
||||
required: true,
|
||||
description: "CSS selector where content is inserted",
|
||||
},
|
||||
insertHtml: {
|
||||
type: "string",
|
||||
required: true,
|
||||
enum: [
|
||||
"afterbegin",
|
||||
"beforeend",
|
||||
"afterend",
|
||||
"beforebegin",
|
||||
"replace"
|
||||
],
|
||||
default: "beforeend",
|
||||
description: "Position relative to selector",
|
||||
},
|
||||
timeUntil: {
|
||||
type: "datetime",
|
||||
description: "Time limit (until when the campaign runs)",
|
||||
},
|
||||
javascript: {
|
||||
type: "string",
|
||||
description: "Optional JavaScript",
|
||||
},
|
||||
medias: {
|
||||
type: "array",
|
||||
items: {
|
||||
type: "reference",
|
||||
collection: "img",
|
||||
},
|
||||
description: "Media (images)",
|
||||
},
|
||||
html: {
|
||||
type: "html",
|
||||
description: "HTML content",
|
||||
},
|
||||
css: {
|
||||
type: "string",
|
||||
description: "Optional CSS",
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user