Phoenix Template Engine for Slim
Powered by Slime
Usage
- Add
{:phoenix_slime, "~> 0.4.1"}to your deps inmix.exs. - Add the following your Phoenix
config/config.exs:
config :phoenix, :template_engines,
slim: PhoenixSlime.Engine
slime: PhoenixSlime.Engine
An example project can be found at slime-lang/phoenix_slime_example.
Live Reloader
In my_app/config/dev.exs, include the slim and slime extensions in the list of watched files.
# Watch static and templates for browser reloading.
config :my_app, MyApp.Endpoint,
live_reload: [
patterns: [
~r{priv/static/.*(js|css|png|jpeg|jpg|gif)$},
~r{web/views/.*(ex)$},
~r{web/templates/.*(eex|slim|slime)$}
]
]
License
MIT license. Please see LICENSE for details.