mrdocs::Config::Settings::load

Loads the public configuration settings from the specified YAML file.

Synopsis

Declared in <mrdocs/Config.hpp>

static
Expected<void>
load(
    Config::Settings& s,
    std::string_view configYaml,
    ReferenceDirectories const& dirs);

Description

This function takes a YAML file and a set of reference directories as input. It parses the YAML file and loads the configuration settings into a Config::Settings object. The reference directories are used to resolve any relative paths in the configuration settings.

Return Value

An Expected object containing a Config::Settings object if the YAML file was successfully parsed and the configuration settings were loaded, or an error otherwise.

Parameters

Name Description

s

A reference to a Config::Settings object where the configuration settings will be loaded.

configYaml

A string view representing the YAML file containing the configuration settings.

dirs

A constant reference to a PublicSettings::ReferenceDirectories object containing the reference directories.

Created with MrDocs