-
Notifications
You must be signed in to change notification settings - Fork 0
Context
Jérôme Beau edited this page Nov 11, 2022
·
5 revisions
A SsgContext is provided to Ssg methods (SsgStep.execute(content) and ReplaceCommand.execute(context)) to carry information about :
- the current
locale(s) - the current
inputFilethat has been read - the current
outputFilethat is about to be written - current values of variables values (through
getVar()) that may have been set by current or previous replacements (throughsetVar()).
It also provides utility logging methods (log()/warn()/error()/debug()) and a clone() method.
You can create your own context by implementing the SsgContext interface (typically to provide custom info to custom steps).