powered by
Loaders are responsible for exposing templates to the templating engine.
path_loader() loads templates from a directory in the file system.
path_loader()
package_loader() loads templates from a directory in an R package.
package_loader()
list_loader() loads templates from a named list.
list_loader()
path_loader(...)package_loader(package, ...)list_loader(x)
package_loader(package, ...)
list_loader(x)
A "jinjar_loader" object.
"jinjar_loader"
Strings specifying path components.
Name of the package in which to search.
Named list mapping template names to template sources.
The loader is an argument to jinjar_config().
jinjar_config()
path_loader(getwd()) package_loader("base", "demo") list_loader(list( header = "Title: {{ title }}", content = "Hello {{ person }}!" ))
Run the code above in your browser using DataLab