UWCS/stardust

Preview shortcodes in CMS

Opened this issue · 0 comments

So shortcodes are lovely except it would be quite nice if the CMS recognised them (both Decap and Static have separate shortcode systems, but both incompatible with Zola's).

Decap allows custom editor components, which can be given arbitrary regex detection and arbitrary JS conversion to md, which kinda works, except it requires a lot of boilerplate (see template/shortcodes/gen_component_top.html), and manually repeating this for each shortcode. Not too bad so far, but:

I definitely don't want to have to require each shortcode to be duplicated into JS, but it really is the only way for all but the most basic shortcodes. The current system just invokes the shortcode as a template for the JS, but with ${data.<name>} for each property, this however obviously only works for templates with 0 control flow whatsoever.

So um, current status is that basic ones can work and maybe more functionality will be added in future (but I don't want to overcomplicate things)