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
orit_IT
-
forceRandomSeed
: the integer random seed (optionnal) -
defaultSynoMode
: putsequence
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 usingchoosebest
; default is 5 -
disableFiltering
to disable completely the filtering mechanism
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
:
Only if you plan to do browser rendering (do nothing if you render using node.js):
-
put
embedResources:true
-
language
is mandatory -
you can explicitly add linguistic resources which are not detected using
verbs
,words
andadjectives
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.