phoenix_pandoc v1.0.0 PhoenixPandoc.Engine View Source

Implementation of the Phoenix.Template.Engine behaviour.

This module invokes pandoc via the PhoenixPandoc.Pandoc wrapper at runtime. The templates cannot be converted at compile time since they must be evaluated by EEx first (tags may generate markup), and the assigns are not available then. It relies on Phoenix.HTML.Engine to sanitize the HTML.

Link to this section Summary

Link to this section Functions

Link to this function compile(path, name) View Source
compile(String.t(), String.t()) :: Macro.t()

Implementation of the Phoenix.Template.Engine.compile/2 callback

This is invoked by Phoenix.Template here. It is used to compile the template into a function. You should never need to call this directly.

Parameters

  • path - Path of the temlate being compiled
  • _name - Name of the template being compiled, stripped of its suffix.

The second callback parameter is ignored. It could be used to control the pandoc writer, but Phoenix requires HTML.