thegetty / quire

A multi-package repository for the Quire multiformat publishing framework
https://quire.getty.edu/
BSD 3-Clause "New" or "Revised" License
89 stars 10 forks source link

DEV-16531: Implement `addWebcShortcode` in `shortcodeFactory` #881

Closed anderspollack closed 8 months ago

anderspollack commented 8 months ago

I'm definitely open to different ways of serializing attributes for webc components. Since we don't have keyword args in liquid, I was thinking we would have to specify the argument names when registering shortcodes:

component registration:

addWebcShortcode('gradoo, 'gradoo-component', ['foo', 'bar'])

liquid template

{% gradoo 'hello' 'goodbye' %}

webc template

<gradoo-component foo="hello" bar="goodbye"></gradoo-component>