Config File
Right now, a Yarte configuration file can have the following:
-
main
(general configuration - optional): with attributedir
: name of template directory. If no value is given, a default directorytemplates
will be used. If the defined directory is not found, an error will prompt.debug
: type of output of debug mode. The code and/or ast generated by Yarte can be visualize, to do so, at most one of three possible values has to be given:code
,ast
, orall
.
-
partials
(partials aliasing - optional): each entry must be of the typename_alias = "./alias/path/"
, where./
makes reference todir
value. Path must exist, or error will be prompt. If the tagpartials
doesn't exist no aliasing will be possible. -
debug
(debugging configuration - optional): in order to visualize clearly generated code in a debugging environment Yarte gives it a tabulated format, and the possibility to see the number line, use a colour theme. Options are the following:number_line
(default:false
): Boolean, if set totrue
number lines will appear in debug-mode.theme
(default:zenburn
): String, color theme used in debugging environment. Possible values are:DarkNeon
,GitHub
,Monokai Extended
,Monokai Extended Bright
,Monokai Extended Light
,Monokai Extended Origin
,OneHalfDark
,OneHalfLight
,Sublime Snazzy
,TwoDark
,zenburn
grid
(default:false
): Booleanheader
(default:false
): Booleanpaging
(default:false
): Booleanshort
(default:true
): Boolean, if set tofalse
to verbose
Example of a config file
[main]
dir = "templates"
debug = "all"
[partials]
alias = "./deep/more/deep"
[debug]
theme = "zenburn"
number_line = true
grid = true
header = true
paging = false
short = false
With this configuration, the user can call alias
in a partial instance with
{{> alias context}}
or {{> alias}}
if the current context is well defined.