Embedded Crystal is an actively used template language created in 2016. Embedded Crystal (ECR) is a template language for embedding Crystal code into other text, that includes but is not limited to HTML. The template is read and transformed at compile time and then embedded into the binary.
- the Embedded Crystal website
- Embedded Crystal first appeared in 2016
- file extensions for Embedded Crystal include ecr
- Have a question about Embedded Crystal not answered here? Email me and let me know how I can help.
Example code from the web:
# greeting.ecr <%- if @name -%> Greeting, <%= @name %>! <%- else -%> Greeting! <%- end -%> Greeting.new(nil).to_s #=> Greeting!
Example code from Linguist:
<% if @name %> Greeting, <%= @name %>! <% else %> Greeting! <% end %>
Last updated January 18th, 2020