Jader
Use the pug templating engine with ambiorix.
Installation
# install.packages("remotes")
remotes::install_github("ambiorix-web/pugger")
Example
Render the following test.pug
file.
!!! 5
html(lang="en")
head
title= pageTitle
:javascript
| if (foo) {
| bar()
| }
body
h1 Jade - node template engine
#container
- if (iUseJader)
Vape juice are amazing
- else
Get on it!
Get on it!
Get on it!
Get on it!
With the following app.
library(ambiorix)
app <- Ambiorix$new()
app$engine(jader::jader())
app$get("/", \(req, res) {
res$render(
"test.jade",
list(
iUseJader = TRUE
)
)
})
app$start()
Outside of Ambiorix
Just use renderer
.
pugger::renderer(
"test.pug",
list(de
iUsePugger = TRUE
)
)