plentico / plenti

Static Site Generator with Go backend and Svelte frontend

Home Page:https://plenti.co

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add custom widgets to CMS

notramo opened this issue · comments

In any serious site, there are bigger requirements for CMS data types then the _schema.json file could provide. Component authors might want to write custom CMS widgets for managing data consumed by the component.
E.g. there is a widget that displays an image with art direction settings (what should be in center when cropping):

{
  "src": "/assets/image.webp",
  "x": 140,
  "y": 355
}

This is unintuitive to manage it using numeric fields, no matter what scheme is provided. It should be managed by a widget that displays the image, and lets the user click a pixel on the image to select as center.

Instead of schema JSON, the CMS for a given page should be programmed in JS, with Svelte widgets. Instead of learning a new format (schema JSON), programmers could utilize their existing knowledge.

Totally agree @notramo. Might not happen in the short term, but is something we'll need to add. I'm going to close this issue for now, because this rough concept is capture in another ticket: #219