Defines the boundary between a portable site and a concrete renderer.
A renderer turns validated Page and Site values into output and declares
the capabilities that output can honestly provide. admit/3 compares those
capabilities with requirements derived from page content before rendering.
Unsupported essential content fails; optional content is admitted only when
its declared fallback still matches the projected page.
Renderers receive inert values and local logical assets. Authorization, application sessions, routing policy, deployment, and source collection stay with the host or projector. This behaviour therefore works for a hosted UI and a no-server static build without making either one the core abstraction.
Summary
Callbacks
Returns local assets needed by this site generation.
Returns the renderer's normalized capability declaration.
Renders the site's not-found page.
Renders one admitted page.
Functions
Checks that a renderer can satisfy one page in an output mode.
Returns the closed DSH.01 feature identifiers reserved by DocShell.
Callbacks
@callback assets(DocShell.Presentation.Site.t(), keyword()) :: {:ok, [DocShell.Presentation.Asset.t()]} | {:error, term()}
Returns local assets needed by this site generation.
@callback capabilities() :: DocShell.Presentation.Renderer.Capabilities.t()
Returns the renderer's normalized capability declaration.
@callback render_not_found( DocShell.Presentation.Site.t(), DocShell.Presentation.Renderer.Context.t() ) :: {:ok, iodata()} | {:error, term()}
Renders the site's not-found page.
@callback render_page( DocShell.Presentation.Page.t(), DocShell.Presentation.Renderer.Context.t() ) :: {:ok, iodata()} | {:error, term()}
Renders one admitted page.
Functions
@spec admit( DocShell.Presentation.Page.t(), DocShell.Presentation.Renderer.Capabilities.t(), :hosted | :static ) :: :ok | {:error, term()}
Checks that a renderer can satisfy one page in an output mode.
@spec reserved_features() :: [String.t()]
Returns the closed DSH.01 feature identifiers reserved by DocShell.