Wraith.Config (Wraith v0.1.0)

View Source

What the core needs to know about how the site is served, in one place.

Feeds, newsletter links, the API and the MCP tools build absolute URLs; settings validation needs the installed theme names. Those facts live in the web layer (the endpoint, the theme registry), so instead of Wraith.* reaching into WraithWeb.* all over, this module is the one seam: prod sets :site_url in runtime.exs, the web layer registers the themes at boot, and dev/test fall back to the endpoint's own URL.

Summary

Functions

The public hostname (for noreply@…).

The public origin of the site, no trailing slash: https://blog.example.com.

Installed themes' info maps (name, label, layout_name, …).

Installed theme names (registered by WraithWeb.Themes.register/0 at boot).

Functions

host()

@spec host() :: String.t()

The public hostname (for noreply@…).

site_url()

@spec site_url() :: String.t()

The public origin of the site, no trailing slash: https://blog.example.com.

theme_infos()

@spec theme_infos() :: [map()]

Installed themes' info maps (name, label, layout_name, …).

theme_names()

@spec theme_names() :: [String.t()]

Installed theme names (registered by WraithWeb.Themes.register/0 at boot).