DocShell.Presentation.Settings (DocShell v2.0.0)

Copy Markdown View Source

Validates optional, inert presentation choices shared by site renderers.

A site source may return a presentation object with brand, footer, labels, locales, releases, metadata, and robots keys. These values carry host-authored text and destinations; they contain no callbacks, HTML, framework components, authorization rules, or route inference. Empty settings preserve renderer defaults. Renderers may ignore labels they do not recognize.

Brand links use label and href, with an optional local logo record (asset logical name and alt text). Footer records have optional text and links. Locale/release entries have id, label, href, and optional boolean current. Destinations are root-relative URLs or absolute HTTP(S) URLs. Logical logo names resolve through the renderer context's asset map.

Metadata accepts description, image, and robots (a list of standard indexing tokens). The separate robots record carries absolute-path allow and disallow lists for robots.txt. Hosts choose every indexing policy. Lists and strings have finite bounds, and unknown structural keys fail rather than becoming accidental renderer instructions.

Summary

Types

t()

Validated string-keyed portable presentation data.

Functions

Checks presentation data without changing its values or supplying host policy.

Types

t()

@type t() :: map()

Validated string-keyed portable presentation data.

Functions

validate(value)

@spec validate(term()) :: :ok | {:error, term()}

Checks presentation data without changing its values or supplying host policy.