Discover addon‐defined data‐driven generators and install them.

Synopsis

Declared in <mrdocs/Generator.hpp>

Expected<void>
discoverDataDrivenGenerators(Config const& config);

Description

For each configured addon root, the immediate subdirectories of <root>/generator/ that ship an mrdocs‐generator.yml manifest are installed into the global registry as data‐driven Handlebars generators (see the manifest format documentation). A built‐in generator of the same id takes precedence, so its addon directory is skipped. Directories that hold only shared assets and declare no manifest are skipped too.

Call this once, after the configuration is resolved and before a generator is looked up by id with findGenerator. It is one of the pieces the command‐line tool composes to run its generate step; the order of that step lives in the tool.

Thread Safety

Installs into the process‐global registry, so it may not be called concurrently with installGenerator.

Return Value

The error, if any occurred.

Parameters

Name

Description

config

The resolved configuration whose addon roots are walked.

Created with MrDocs