Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tera

R-CMD-check CRAN status extendr

The tera package uses extendr to provide access to Vincent Prouillet’s Tera templating engine in Rust. Users mainly interact with a Tera R6 object, which serves as a template library with encapsulated methods for rendering templates with a given context. Template syntax supports additional logic, including built-in filters, tests, and functions, as well as loops, conditions, and inheritance. Documentation for Tera’s templating syntax can be found at https://keats.github.io/tera/.

Installation

The published CRAN version:

install.packages("tera")

The development version:

# install.packages("pak")
pak::pak("kbvernon/tera-r")

Usage

Here is a simple hello-world example:

library(tera)

tera <- Tera$new()

tera$render_string(
  '<p>Hello {{ x }}. This is {{ y }}.</p>',
  x = "world",
  y = "tera"
)
#> [1] "<p>Hello world. This is tera.</p>"

To learn more, check out the Getting started article on the package website, or call vignette("tera").

About

❗ This is a read-only mirror of the CRAN R package repository. tera — Generate Text and Documents with the Tera Templating Engine. Homepage: https://github.com/kbvernon/tera-r, https://kbvernon.github.io/tera-r/

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages