[ANN] Ginger: Jinja-like HTML templates for Haskell
Dear Cafe, I've been working on this for a while now, and figured now is as good a time as any to announce it properly, so here it is. https://ginger.tobiasdammers.nl/ Ginger is a Haskell implementation of Jinja (http://jinja.pocoo.org/), the best-of-breed in the "DOM-agnostic HTML template engines for Python" arena (or at least I think it is). The reason I built this is because upon researching HTML templating solutions for Haskell, I noticed that almost all of them are typesafe compile-time solutions (either EDSLs or something TH/QQ), which is awesome but doesn't fit my use cases. I believe I am not alone here. Code is on github: https://github.com/tdammers/ginger And also on bitbucket: https://bitbucket.org/tdammers/ginger And of course Ginger is available from hackage: http://ginger.tobiasdammers.nl/ Any kind of feedback is very welcome. Thanks for your time! - Tobias -- Tobias Dammers - tdammers@gmail.com
I'm glad to see this--I use jinja2 for so many things and having more options is good. I love how saying the name 'ginger' with the right accent sounds exactly like 'jinja' :) Sent from my iPhone
On Nov 17, 2016, at 3:05 AM, Tobias Dammers <tdammers@gmail.com> wrote:
Dear Cafe,
I've been working on this for a while now, and figured now is as good a time as any to announce it properly, so here it is.
https://ginger.tobiasdammers.nl/
Ginger is a Haskell implementation of Jinja (http://jinja.pocoo.org/), the best-of-breed in the "DOM-agnostic HTML template engines for Python" arena (or at least I think it is).
The reason I built this is because upon researching HTML templating solutions for Haskell, I noticed that almost all of them are typesafe compile-time solutions (either EDSLs or something TH/QQ), which is awesome but doesn't fit my use cases. I believe I am not alone here.
Code is on github: https://github.com/tdammers/ginger
And also on bitbucket: https://bitbucket.org/tdammers/ginger
And of course Ginger is available from hackage: http://ginger.tobiasdammers.nl/
Any kind of feedback is very welcome.
Thanks for your time!
- Tobias
-- Tobias Dammers - tdammers@gmail.com _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
This look really interesting. I especially appreciate all the documentation. I did have a question, though, from looking at the Readme, about what the context looks like. For instance, your example in the Readme iterates over items and puts `item.url` into the template, but that dotted lookup looks weird to me when I think about the haskell data types getting injected into the template. Is that a list of Haskell records? Anyway, it might be worth including a sample context in the Readme, to complete that example. More broadly, I realized that there may be some mental paradigm shifts I would have to do when going from Haskell to Jinja or vice versa. It looks like a solid effort, though, and very interesting. On Nov 17, 2016 5:22 AM, "Tobias Dammers" <tdammers@gmail.com> wrote:
On Thu, Nov 17, 2016 at 06:05:51AM -0500, Josh Barney wrote:
I love how saying the name 'ginger' with the right accent sounds exactly like 'jinja' :)
That's intentional :) _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
participants (3)
-
erik -
Josh Barney -
Tobias Dammers