Module Memoir_content.Routing

Path resolution and routing system

val path_to_url_path : string -> Base.String.t

Convert content path to URL path

val path_to_output_path : string -> output_dir:string -> string

Convert content path to output file path

val determine_content_type : Base.String.t -> Content_types.content_type

Determine content type from directory path

val create_route : Content_types.content_page -> output_dir:string -> Content_types.route

Create a route for a content page

val generate_routes : Content_types.content_page Base.List.t -> output_dir:string -> Content_types.route Base.List.t

Generate routes for all content pages

val ensure_output_directory : Content_types.route -> (unit, string) Base.result

Ensure output directory exists for a route

val find_route_by_url_path : Content_types.route Base.List.t -> Base.String.t -> Content_types.route option

Find a route by URL path

val create_sitemap : Content_types.route Base.List.t -> base_url:string -> string Base.List.t

Create a sitemap of all routes