CloudCannon / bookshop

📚 A component development workflow for static websites.
MIT License
249 stars 21 forks source link

Initialize nested component structures with data #105

Open bglw opened 2 years ago

bglw commented 2 years ago

Currently, the only component shorthand available is:

button: "bookshop:button" #or:
buttons: ["bookshop:button"]

In both of these instances, the object or array will be initialized in the CMS empty. We should provide something like the following:

button: "bookshop:button!" #or:
buttons: ["bookshop:button!", "bookshop:button!"]

Where components suffixed with ! are pre-populated when added to the CMS.

Bonus considerations: