Code52 / pretzel

A site generation tool (and then some) for .NET platforms
http://code52.org/pretzel/
Microsoft Public License
598 stars 163 forks source link

Idea: Liquid components / Razor components #354

Open biohazard999 opened 4 years ago

biohazard999 commented 4 years ago

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.

laedit commented 4 years ago

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?

biohazard999 commented 4 years ago

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