PhoenixPandoc (phoenix_pandoc v1.1.2)
View SourceA Phoenix template engine for pandoc that fully supports EEx templates.
It tries (not very hard) to map file extensions to pandoc readers, but any
reader can be used by naming the template like name.html.reader
. See
pandoc --list-input-formats
for a list of supported readers.
Optional Markdown Configuration
Pandoc supports multiple flavors of Markdown. This module defaults to the
Github-flavored Markdown reader (gfm
) for .md
files. This can be
overridden in your project's config.exs
like so:
config :phoenix_pandoc, markdown_flavor: "commonmark"
:markdown_flavor
must be set to one of: ["gfm", "commonmark", "markdown", "markdown_phpextra", "markdown_strict"]
.
Summary
Functions
Try to detect the pandoc reader for a file extension.
Functions
Try to detect the pandoc reader for a file extension.
Supports the following extension mappings:
Extension | Reader |
---|---|
.eex | html |
.html | html |
.md | gfm |
.mmd | markdown_mmd |
.tex | latex |
This function raises an ArgumentError
if the extension is not explicitly
supported, or a pandoc reader.