The robot writer uses Pug templates, with a number of helper functions and mixins.
For further documentation see the Murasaki docs
/lead/json/lead/html/lead/chartAll API endpoints take POST requests.
html endpointThe request body should follow this general pattern:
{
lead,
template: {
type,
[type]: content
},
translations
}
type can be either "string" or "key".
translations can be a translation dictionary, or the name(s) of one or more build-in dicionaries.
{
"lead": {"a": "world"},
"template": {
"type": "string",
"string": "p Hello #{a}!"
}
}<p>Hello world!</p>
{
"lead": {"municipality": "Moss kommune"},
"template": {
"type": "string",
"string": "p Everything is fine in #{t(municipality)}.",
}
"translations": ["norway"]
}<p>Everything is fine in Moss municipality.</p>
lang: Language/locale. Default is sv-SE. Used to select writer templates, and for number formatting, currency symbols, etc.timezone: An IANA timezone string, e.g. Europe/Stockholm. Default is Etc/UTCoverwrite: Force charts to be re-rendered even if they already exist.debug: Add debugging markup to generated HTML.