Various templating languages can be used with corresponding templateData variables as shown below:
Docpad.coffee
/docpad.coffee
docpadConfig = {
templateData:
site:
url: "http://www.example.com"
}
Eco:
/src/documents/index.html.eco
<p>My site is <%= @site.url %></p>
CoffeeScript:
/src/documents/index.html.coffee
p "My site is " + @site.url
Alternatively, within a script file:
/src/documents/scripts/scripts.js.coffee
console.log( @site.url )
/out/scripts/script.js
console.log("http://www.example.com");
/src/documents/index.html.hogan
<p>My site is {{@site.url}}</p>
/src/documents/index.html.jade
p My site is #{site.url}