Minimalistic HTML templates for Elixir, inspired by Slim.
Slime is an Elixir library for rendering Slim-like templates as HTML. It provides a refreshing way to slim down your markup in Elixir. With Slime, you can easily convert complex markup into a more concise and readable format. It offers various features such as reference attributes, Elixir code evaluation, comments, conditionals, doctype shortcuts, iteration, embedded engines, precompilation, and more. Slime aims for feature parity with the original Ruby Slim implementation, but deviates in some respects to stay true to Elixir.
- for expression evaluation and = for expression evaluation and value insertion into the template./ character, and insert HTML <!-- --> comments using /!.if expression, for conditional rendering in templates.Slime.function_from_file/5 and Slime.function_from_string/5.Slime is a powerful Elixir library that simplifies markup rendering by providing a Slim-like template syntax. It offers various features such as reference attributes, code evaluation, comments, conditionals, shortcut doctypes, iteration, embedded engines, and precompilation. Slime aims to stay true to Elixir while providing feature parity with the original Ruby Slim implementation. It is easy to learn and integrate with Phoenix and offers a concise and readable approach to markup generation in Elixir applications. Contributions are welcomed, and the library is available under the MIT license.