Converts portable file-route names into Astral route patterns.
File routes use Astro-style bracket segments because : and * are awkward
in filenames on Windows and in shells:
pages/blog/[slug].astral -> /blog/:slug
pages/docs/[...path].md -> /docs/*pathThe resulting route patterns keep Astral's Elixir/Phoenix-style :param and
*glob syntax at the API boundary.
Summary
Functions
Return true when a relative page path contains bracket route params.
Match a concrete path and return string-keyed params for template assigns.
Parse a path relative to the pages directory into a file route.
Return the concrete static route path for a non-dynamic file route.
Types
@type t() :: %Astral.Route.File{ dynamic?: boolean(), params: [String.t()], pattern: Astral.Route.Pattern.t(), source: String.t() }
Functions
Return true when a relative page path contains bracket route params.
Match a concrete path and return string-keyed params for template assigns.
Parse a path relative to the pages directory into a file route.
Return the concrete static route path for a non-dynamic file route.