Global Parameters

This is the documentation for 4.3.0 version, which is not the latest version. Consider upgrading to 4.4.0.

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 (default is true).

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

  • renderDebug: boolean, default false; in the generated text, will indicate the path followed to generate the text (only use it for debug during development as it has a strong impact on the generated text)

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