pretzel icon indicating copy to clipboard operation
pretzel copied to clipboard

Idea: Liquid components / Razor components

Open biohazard999 opened this issue 5 years ago • 2 comments

With the rise of webcomponents & frameworks like vuejs and react it would be really cool if we could support a similar model to separate chunks of ui into smaller pieces and use binding for repeats and bindable objects.

We can discuss about styling in a later version of the proposal, probably we don't need that, cause i don't think most sites will be large enough to need css separation.

Of course we can use includes, but we can't pass binding information from the outside into the component, so we need to use a lot of trickery and need to duplicate a lot of stuff and queries to for example show the last 10 items in an separate form.

But I think this is something we should address after 1.0.

It's an idea that came in mind a few days ago. It would be (besides running on dotnet) a major improvement vs jekyll and could attract more people using pretzel over jekyll.

Technically, I think, we could use custom liquid tags / razor tags generated during site discovery before templates are getting hydrated.

biohazard999 avatar Sep 30 '19 16:09 biohazard999

That's a great idea but I was thinking that Jekyll parameters and variables in includes (that we still miss in pretzel) were sufficient. Or am I missing something?

laedit avatar Sep 30 '19 19:09 laedit

Dunno, didn't miss them so far, but going parity first would be good!

biohazard999 avatar Sep 30 '19 21:09 biohazard999