Premade functions to manipulate your bundles/definitions with.
For each definition that has the given
relativePath (1st argument),
make a clone with a new
relativePath (2nd argument),
and add that into the compendium just after the matching definition.
>>> clone "index.html" "200.html" bundle
Copy definition properties into the metadata.
Append the given directory path to the directory path of each definition.
Filter out the definitions that have the given
Insert additional metadata.
relativePath of the definitions that match a given
For example, if you have a definition with the relativePath path
>>> rename ..> (Path.file [ "a", "b", "example.html" ]) ..> (Path.file [ "example", "index.html" ]) ..> compendium
>>> renameExtension "markdown" "html" compendium ..> -- The definitions that had the extensionName "markdown" ..> -- now have the extensionName "html"
content property by providing a renderer.
A renderer is a function with the signature
Definition -> Maybe Bytes.
You can use this to render templates, markdown, etc.
Replace the current metadata dictionary with another one.
Set content directly.
Only keep definitions with the given base name.
Only keep definitions with the given directory path.
Only keep definitions with the given extension.
Only keep definitions with the given metadata.