Creates an instance of files content injector.
List of all files for content injection
Instance of Translator
to translate file contents
Retrieves the list of files to process with ListFiles
and loops them with forEach
. The source files are taken from the out
folder where they have been copied to by copyPages
or have been created there by generate-from-files
Determines the destination folder in which the processed file should be copied to.
Process each file found in the out
dir. For each file delegates the processing of directives to DirectivesParser
. From DirectivesParser
receives the complete content of the file and the Front Matter data. The Front Matter data is added to the top of the file as a string for later use in post processing. If i18n is enabled the translation is carried out. Finally the existing file in out
is overwritten with the new contents.
the full path on disk to the file being processed.
the language being processed if i18n is enabled.
Initiates a new instance of Translator
to translate file contents.
the current language being processed.
Entry point for executing all directives other than
generate-from-files
. If i18n is enabled it gets called for each language.