knit engine

library(jinjar)
contents <- list(
  navigation = data.frame(
    caption = c("Home", "Blog"),
    href = c("index.html", "blog.html")
  ),
  title = "My Webpage"
)

{jinjar, jinjar_lang="html", data=contents} <!DOCTYPE html> <html lang="en"> <head> <title>{{ title }}</title> </head> <body> <ul id="navigation"> {% for item in navigation -%} <li><a href="{{ item.href }}">{{ item.caption }}</a></li> {% endfor -%} </ul> </body> </html>



Try the jinjar package in your browser

Any scripts or data that you put into this service are public.

jinjar documentation built on Nov. 2, 2023, 5:37 p.m.