Xenia.Routes.Page (Xenia v0.1.1)

Copy Markdown View Source

A page found in the app directory. Paths are relative to the app root.

  • file - the page file, e.g. "(auth)/runbooks/[id]/page.ex"
  • path - the Phoenix route path, e.g. "/runbooks/:id"
  • params - names of the dynamic segments, in URL order
  • groups - route groups the page sits in, outermost first
  • layouts - layout files that apply to the page, outermost first
  • persistent - each of those layouts' persistent.ex, by layout file;
            layouts without one are left out
  • live - the nearest live.ex in the page's folder or above it: the
            LiveView the page shares with its siblings. `nil` when the
            page is its own LiveView.

Summary

Types

t()

@type t() :: %Xenia.Routes.Page{
  file: String.t(),
  groups: [String.t()],
  layouts: [String.t()],
  live: String.t() | nil,
  params: [String.t()],
  path: String.t(),
  persistent: %{required(String.t()) => String.t()}
}