Creates an instance of front matter injector.
the contents of the file where to look for insert commanda.
the full Front Matter data of the file to be inserted.
the contents of the file where to look for insert commanda.
the full Front Matter data of the file to be inserted.
Starts the logic of front matter injector. For each key
in data
calls injectDataValues
.
the contents of the file as updated with the injected data.
Injects data values into content by matching the regexp formed by each key
of data
between tcurly brackets.
the key of the data to look for.
the value to be injected.
Converts non string Front Matter data values to strings with JSON stringify.
the value to check and eventually convert.
the key of the data.
the value as a string.
Injects Front Matter data into the contents of a file by analyzing where a data key is found in content between curly brackets.