
An HTML DSL for Elixir and Phoenix
Temple is an innovative Domain-Specific Language (DSL) designed specifically for writing HTML and SVG within the Elixir ecosystem. Emphasizing simplicity and compatibility, Temple allows developers to seamlessly create and utilize components in their web applications. It is crafted to support various web environments, which makes it a versatile choice for those working with frameworks like Plug, Aino, and Phoenix.
With Temple, developers can leverage a clean syntax while creating templates that stay in line with valid Elixir. This approach not only promotes code readability but also enhances collaboration across teams by enforcing consistent coding standards.
Valid Elixir Syntax: Temple ensures that all generated code adheres to valid Elixir syntax, which boosts reliability and maintainability.
Web Environment Compatibility: It is designed to work with all key web environments such as Plug, Aino, and Phoenix, making it adaptable for various projects.
Component Slot Concept: Similar to Vue, Temple components feature "slots" that allow for greater flexibility and reusable code management.
HEEx and Surface Compatibility: Temple can be used alongside HEEx and Surface components, enabling developers to share templates across different components effortlessly.
Built-in HTML Escaping: By default, Temple integrates with Phoenix.HTML.Engine for HTML escaping, ensuring that your outputs are safe from injection attacks.
Formatter Integration: Temple offers an easy way to include its formatter within your project, streamlining the development process and maintaining coding standards.
Phoenix Helpers: For users of Phoenix framework version ~> 1.7, Temple provides bundled helpers and a dedicated template engine, enhancing the overall development experience.
