warning - not true, this is leex engine.
Cant get this to work with heex-engine. Using Phoenix.LiveView.HTMLEngine will complain that it has no init/1.
So I now do Phoenix.Template.compile_all which is a little odd if you want to get a function for exactly one file. But you can still do it:
if you have this template:
/foo/bar/template.html.heex
Phoenix.Template.compile_all(
fn _ -> "template" end,
"/foo/bar/",
"template.html" # do not add .heex here! Its automatically added to the pattern!
)
note, that you can just give this to the engines arg:
%{md: Phoenix.Template.engines().heex, ...}
Now you can read markdown into a template! Cool.




















