Global Parameters

Rendering parameters

When using renderFile or render, parameters are (along Pug’s standard parameters):

  • language: the output language (mandatory): fr_FR, en_US, de_DE or it_IT

  • forceRandomSeed: the integer random seed (optionnal)

  • defaultSynoMode: put sequence if you want synonyms to be sequence based by default, once to get each alternative triggered once; random is the default value, see Global Synonym Mode

  • defaultAmong: indicates the maximum attempts to find the best alternative when using choosebest; default is 5

Along all Pug’s parameters, you should put cache:true.

  • put yseop:true

  • use string:true to generate a plain string containing all templates, which is handy for debug

  • or to generate the Yseop TextFunction files, provide yseopPath as the folder where to write them

Compiling parameters

When using compileFileClient or compileFile:

language is always mandatory.

Only if you plan to do browser rendering (do nothing if you render using node.js):

verbs: ['essen', 'fressen', 'gehen'],
words: ['Gurke'],
adjectives: ['alt', 'dick'],

Pug’s parameters for compilation include compileDebug, which should be put to false in production to reduce the size of the generated js function.