Astral.Page (Astral v0.8.0)

Copy Markdown View Source

A source page discovered by Astral.

Summary

Functions

Return the assigns a page and its layout render with.

Types

t()

@type t() :: %Astral.Page{
  assigns: %{required(atom()) => term()},
  content: Astral.Content.t(),
  entry: Astral.Entry.t() | nil,
  output_path: String.t(),
  params: %{required(atom()) => term()},
  route_path: String.t(),
  source_path: String.t()
}

Functions

assigns(page, site)

@spec assigns(t(), Astral.Site.t()) :: map()

Return the assigns a page and its layout render with.

:title is the page's frontmatter title, or nil, so layouts can read @title whether a Markdown page or an .astral page renders them.