Execute Astral plugin hooks.
Summary
Functions
Run build_done hooks until one returns an error.
Run build_start hooks until one returns an error.
Run an optional hook with Volt-style extra-arity opts support.
Run config hooks in sequence.
Normalize and order plugins.
Run render_page hooks in sequence, piping HTML through each plugin.
Render a generated route with the first plugin that owns it.
Collect generated routes from plugins.
Run site_discovered hooks in sequence.
Types
@type plugin() :: Astral.Plugin.plugin()
Functions
@spec build_done([plugin()], Astral.BuildResult.t()) :: :ok | {:error, term()}
Run build_done hooks until one returns an error.
@spec build_start([plugin()], Astral.Config.t()) :: :ok | {:error, term()}
Run build_start hooks until one returns an error.
Run an optional hook with Volt-style extra-arity opts support.
@spec config([plugin()], Astral.Config.t()) :: Astral.Config.t()
Run config hooks in sequence.
Normalize and order plugins.
@spec render_page([plugin()], String.t(), Astral.Page.t(), Astral.Site.t()) :: {:ok, String.t()} | {:error, term()}
Run render_page hooks in sequence, piping HTML through each plugin.
@spec render_route([plugin()], Astral.Route.t(), Astral.Site.t()) :: {:ok, iodata(), String.t()} | {:ok, iodata(), String.t(), [{String.t(), String.t()}]} | {:error, term()} | nil
Render a generated route with the first plugin that owns it.
@spec routes([plugin()], Astral.Site.t()) :: [Astral.Route.t()]
Collect generated routes from plugins.
@spec site_discovered([plugin()], Astral.Site.t()) :: Astral.Site.t()
Run site_discovered hooks in sequence.