The docs say:
"Starting with release 0.9.1, the recommended way to add custom tags and filters are to register a module"
How does one register a module with erlydtl?
The docs say:
"Starting with release 0.9.1, the recommended way to add custom tags and filters are to register a module"
How does one register a module with erlydtl?
From my answer at https://github.com/erlydtl/erlydtl/issues/238
It's the options that refers to library you want (from the Readme):
libraries- A list of{Name, Module}libraries implementing custom tags and filters. Module should implement theerlydtl_librarybehaviour.
And:
default_libraries- A list of libraries that should be loaded by default when compiling a template. Libraries can be specified either by name (when there is a name to module mapping also provided in thelibrariesoption) or by module.
If you register a library, but doesn't load it by default, you can load it from a template with the {% load libname %} tag.