Creates an instance of template to html files.
the full absolute path to the template
the full YASSB config Object
the full YASSB config Object
Dir where to look for source files.
Full string of the directive in the template body to determine the source folder.
the full absolute path to the template
List of paths to all the cupported files found at dirSourcePath
, including subdirectories.
Contents of the templte before content is injected.
Regex to match the comments to invoke the directive.
Builds the file name for the file. If in Front Matter a slug is provided, that is preferred. If not, a slug is generated from the title in Front Matter. If no title is found in Front Matter, the title is extracted from the file. If not tile has been found, it falls back to the filename of the data source file.
content of the generated page.
the full path to the file bein processed.
new file name .
Determines where to save the new file by combining the relative path of the template and of the source file.
full absolute path to the source file
out path
Creates a new page from the source file
Extracts from the template the YASSB formatted comment with the directive generate-from-files
pointing to the dir to scan for .md files
The full text of the template
Inits template to html files. The operation is aborted if no directive is found in the template or no file is found in the dirSourcePath
. Else, for each file found a new page is generated based on the template with the contents of the file.
init
Removes the text of the YASSB formatted comment
Takes care of actually injecting in the template the content from a given file and saves to disk the resulting page.