Discover addon‐defined data‐driven generators and add them.
Synopsis
Declared in <mrdocs/Generator.hpp>
Expected<void>
discoverDataDrivenGenerators(
Config const& config,
GeneratorRegistry& registry);
Description
For each configured addon root, the immediate subdirectories of <root>/generator/ that ship an mrdocs‐generator.yml manifest are added to the registry as data‐driven Handlebars generators (see the manifest format documentation). A generator of the same id that the registry already holds takes precedence, so its addon directory is skipped; so is one an earlier addon root contributed. Directories that hold only shared assets and declare no manifest are skipped too.
Call this once per configuration, after the extensions are loaded and before a generator is looked up by id with GeneratorRegistry::find. It is one of the pieces Session::create composes: it runs after the extensions are loaded, so a generator an extension installs takes precedence over an addon directory of the same id. A program that wants that order constructs a Session.
Thread Safety
The call is synchronized with the other calls that add or look up a generator of registry.
Return Value
The error, if any occurred.
Parameters
Name |
Description |
config |
The resolved configuration whose addon roots are walked. |
registry |
The registry the generators are added to. |
Created with MrDocs