# `Phoenix.Template.Engine`
[🔗](https://github.com/phoenixframework/phoenix_template/blob/v1.1.0/lib/phoenix/template/engine.ex#L1)

Specifies the API for adding custom template engines into Phoenix.

Engines must implement the `compile/2` function, that receives
the template file and the template name (usually used as the function
name of the template) and outputs the template quoted expression:

    def compile(template_path, template_name)

See `Phoenix.Template.EExEngine` for an example engine implementation.

# `compile`

```elixir
@callback compile(template_path :: binary(), template_name :: binary()) :: Macro.t()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
