Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview shortcodes in CMS #5

Open
ericthelemur opened this issue Jul 18, 2023 · 0 comments
Open

Preview shortcodes in CMS #5

ericthelemur opened this issue Jul 18, 2023 · 0 comments

Comments

@ericthelemur
Copy link
Contributor

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant