PhoenixKit.Modules.Publishing.Web.Controller.Routing (phoenix_kit v1.7.43)
Copy Markdown View SourceURL path parsing and routing helpers for the publishing controller.
Handles segment building from params and path pattern matching to determine the type of request (listing, slug post, timestamp post, etc.).
Summary
Functions
Builds path segments from route params.
Validates a date string (YYYY-MM-DD format).
Parses path segments to determine the request type.
Validates a time string (HH:MM 24-hour format).
Functions
Builds path segments from route params.
Returns a list of path segments starting with the blog slug, followed by any additional path segments.
Validates a date string (YYYY-MM-DD format).
Parses path segments to determine the request type.
Returns one of:
{:listing, blog_slug}{:slug_post, blog_slug, post_slug}{:timestamp_post, blog_slug, date, time}{:date_only_post, blog_slug, date}{:versioned_post, blog_slug, post_slug, version}{:error, reason}
Validates a time string (HH:MM 24-hour format).