Generates resources by making use of a template engine. The template folder structure will be kept. Folders will be interpreted as containers and files as documents. A FileIdentifierMapper will be used to generate identifiers that correspond to the relative structure.
Metadata resources will be yielded separately from their subject resource.
templateFolder is resolved relative to cwd,
unless it's preceded by
Generates resources with the given options, based on the given template folder. The output Iterable should be sorted so that containers always appear before their contents.
Folder where the templates are located.
Options that can be used when generating resources.
A map where the keys are the identifiers and the values the corresponding representations to store.
Generates a RepresentationMetadata using the given template.
Generates a Resource object for the given ResourceLink. In the case of documents the corresponding template will be used. If a ResourceLink of metadata is provided the corresponding metadata resource will be yielded as a separate resource.
Generates TemplateResourceLinks for each entry in the given folder and combines the results so resources and their metadata are grouped together.
Creates a read stream from the file and applies the template if necessary.
Creates a TemplateResourceLink for the given filePath, which connects a resource URL to its template file. The identifier will be based on the file path stripped from the template extension, but the filePath parameter will still point to the original file.