4 ms·
I'm curious about how startups using Clojure are generating their HTML. Are you guys doing it in Clojure code (e.g. Noir) or are you using some sort of HTML tem
by pivo 14y ago
I'm curious about how startups using Clojure are generating their HTML. Are you guys doing it in Clojure code (e.g. Noir) or are you using some sort of HTML templating support (e.g. JSP)?
While I really like the idea of writing HTML in Clojure, I like even more the idea of being able to have a HTML/CSS/etc expert, who doesn't necessarily know Clojure, be able to maintain the HTML instead of me.
Has anyone found what they think is a good solution?
- spacemanaki 14y ago> I like even more the idea of being able to have a HTML/CSS/etc expert, who doesn't necessarily know Clojure, be able to maintain the HTML instead of me. Check out Enlive, it solves exactly this problem. HTML/CSS is separate from Clojure code and you fill out templates and stuff via CSS style selectors. It's sweet. https://github.com/swannodette/enlive-tutorial https://github.com/swannodette/enlive-tutorial https://github.com/cgrand/enlive https://github.com/cgrand/enlive Btw I think you can use Enlive with Noir, even though some of the examples from Noir use Hiccup, it's not a requirement.
- nmcfarl 14y agoThat tutorial is truly excellent - I’ve been looking for something to replace Hiccup, and this looks to be it!
- tensor 14y agoI prefer Enlive: https://github.com/cgrand/enlive https://github.com/cgrand/enlive
- pbiggar 14y agoAt Circle [1] are doing practically all of our HTML on the client side. Our server exposes an API using Noir, and we had to build a lot of our own stuff on top of that, like authentication. I added coffeescript and hamlcoffee support to dieter [2]. HTML emails are templated in mustache. [1] https://circleci.com https://circleci.com [2] https://github.com/edgecase/dieter https://github.com/edgecase/dieter
- Rayne 14y agoI'm a fan of mustache. There is an excellent implementation for Clojure: https://github.com/davidsantiago/stencil https://github.com/davidsantiago/stencil
- elrodeo 14y agoI'm using hiccup for HTML. Here I gave an overview of my experiment in building a web app entirely in Clojure: http://notehub.org/2012/6/16/how-notehub-is-built http://notehub.org/2012/6/16/how-notehub-is-built