pub fn resolve_path(
path: &str,
keys: &[String],
entry: &str,
) -> (String, String)Expand description
Resolve a requested path against the set of known page keys (each a
.lmn filename stem), returning (page_key, segment).
Algorithm - the framework does not pattern-match segments:
- Strip a leading
/. An empty path resolves toentry(the home page). - Try the full path as a page key; if absent, walk up one segment at a
time to the longest existing prefix (
/user/7->userwhen onlyuser.lmnexists). - The leftover tail after the matched prefix becomes the
segment(/7), for the page’s own code to parse. A whole-path miss falls back toentrywith the normalised path as the segment.