Alternatives To Whisker
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Handlebars.js16,940396,97012,4933 months ago83February 15, 202184mitJavaScript
Minimal templating on steroids.
Mustache.js15,71840,8574,3462 months ago39March 28, 202195mitJavaScript
Minimal templating with {{mustaches}} in JavaScript
a year ago36apache-2.0JavaScript
A compiler for the Mustache templating language
Scriban2,367281219 days ago105July 11, 202243bsd-2-clauseC#
A fast, powerful, safe and lightweight scripting language and engine for .NET
Web Mode1,556
11 days ago5gpl-3.0Emacs Lisp
web template editing mode for emacs
11 years ago1July 08, 201655mitJavaScript
Asynchronous templates for the browser and node.js
2037 years ago58April 23, 201512mitObjective-C
Flexible and production-ready Mustache templates for MacOS Cocoa and iOS
Handlebars.java1,36451712323 days ago51October 12, 2021121otherJava
Logic-less and semantic Mustache templates with Java
Mustache1,02020202 years agoMarch 18, 201232mitGo
The mustache template language in Go
6 years ago1December 14, 201518otherJavaScript
A clean solution for templating with Mustache.js and jQuery or Zepto
Alternatives To Whisker
Select To Compare

Alternative Project Comparisons

version downloads R build status Build status status


Whisker is a {{Mustache}} implementation in R confirming to the Mustache specification. Mustache is a logicless templating language, meaning that no programming source code can be used in your templates. This may seem very limited, but Mustache is nonetheless powerful and has the advantage of being able to be used unaltered in many programming languages. It makes it very easy to write a web application in R using Mustache templates which could also be re-used for client-side rendering with "Mustache.js".

Mustache (and therefore whisker) takes a simple, but different, approach to templating compared to most templating engines. Most templating libraries, such as Sweave, knitr and brew, allow the user to mix programming code and text throughout the template. This is powerful, but ties your template directly to a programming language and makes it difficult to seperate programming code from templating code.

Whisker, on the other hand, takes a Mustache template and uses the variables of the current environment (or the supplied list) to fill in the variables.

Mustache syntax

The syntax of Mustache templates is described in How the mustache template are used with whisker can be found in the whisker documentation, and below.

Mustache specification

Whisker conforms to the Mustache 1.1 specificaton except for delimiter switching and lambdas. We expect that these will be implented shortly.


To install whisker use the following statement in your R console


The latest whisker version is not yet available on CRAN, but can be installed from github:


# dev_mode()
install_github("whisker", "edwindj")


whisker.render accepts a character template and a list or environment containing data to render:

template <- 
'Hello {{name}}
You have just won ${{value}}!
Well, ${{taxed_value}}, after taxes.

data <- list( name = "Chris"
            , value = 10000
            , taxed_value = 10000 - (10000 * 0.4)
            , in_ca = TRUE

text <- whisker.render(template, data)
## Hello Chris
## You have just won $10000!
## Well, $6000, after taxes.

Or using a text file


template <- readLines("./template.html")
data <- list( name = "Chris"
            , value = 10000
            , taxed_value = 10000 - (10000 * 0.4)
            , in_ca = TRUE

writeLines(whisker.render(template, data), "./output.html")


By default whisker applies html escaping on the generated text. To prevent this use {{{variable}}} (triple) in stead of {{variable}}.

template <- 
"I'm escaped: {{name}}
And I'm not: {{{name}}}"

data <- list( name = '<My Name="Nescio">')
whisker.render(template, data)


I'm escaped: &lt;My Name=&quot;Nescio&quot;&gt;
And I'm not: <My Name="Nescio">
Popular Mustache Projects
Popular Templates Projects
Popular Web User Interface Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.