A mapper is needed to convert the template file paths to identifiers relative to the given base identifier.
Folder where the templates are located.
Factory used to generate mapper relative to the base identifier.
Template engine for generating the resources.
The extension of files that need to be interpreted as templates. Will be removed to generate the identifier.
Private
Readonly
factoryPrivate
Readonly
templatePrivate
Readonly
templatePrivate
Readonly
templateGenerates resources with the given options. The output Map should be sorted so that containers always appear before their contents.
A map where the keys are the identifiers and the values the corresponding representations to store.
Base identifier.
Options that can be used when generating resources.
Private
generateGenerates a RepresentationMetadata using the given template.
Private
generateGenerates 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 data will be added as metadata.
Optional
metaLink: TemplateResourceLinkPrivate
groupGenerates TemplateResourceLinks for each entry in the given folder and combines the results so resources and their metadata are grouped together.
Private
processPrivate
processGenerates results for all entries in the given folder, including the folder itself.
Private
toCreates a TemplateResourceLink for the given filePath. 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.
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.
A relative
templateFolder
is resolved relative to cwd, unless it's preceded by@css:
, e.g.@css:foo/bar
.