absolutejam
Alternate template engines
Hey,
I’ve been enjoying LiveView for an internal toy-project, but I’m looking to see if there are any alternative HTML rendering/templating engines.
I’ve found https://github.com/rstacruz/expug which would be ideal as pug is my go-to, but it hasn’t been updated in 2 years and has no LiveView support.
There is also https://github.com/slime-lang/slime but this looks like it has some outstanding major issues.
Anyone have any suggestions or ideas?
Regards.
Most Liked
eahanson
I’ve been using slime for 2+ years and it’s great!
It takes a few minutes to get used to it, but once you do, the thought of typing all the HTML boilerplate seems barbaric ![]()
Slime:
table.extra-wide
tr
th colspan=2 Name
th Age
= for user <- @users do
tr
td= user.first_name
td= user.last_name
td= user.age
There’s even an eex to slime converter to get you started.
Edit: use phoenix_slime to use Slime with Phoenix.
edjroot
Hey, if you’re still interested in using Expug, you can take a look at my forked repos (expug, phoenix_expug).
Nothing major done so far, but I fixed this simple bug and added support for LiveView (but I’m honestly not sure if it’s the right way to do it).
I haven’t updated the docs or anything and I don’t really have many plans for it besides fixing future bugs, but I’ll gladly help if I can. Anyway, I’ve been using it for a while (admittedly for pretty simple stuff) and I’ve had no problems except for that one minor bug.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









