Expand description
Page URL paths: the ones a structure call derives at its end, and links to the old ones.
StructsΒ§
- Link
ToOld Path - A link in course content that points at a pageβs old path.
- Path
Requests π - The paths a callβs ops asked for, applied when the call ends.
- Planned
Path π - A pageβs path before collisions are resolved.
FunctionsΒ§
- assign_
paths π - Gives every page of
docits final path: chapter front pages/chapter-N, other chapter pages/chapter-N/<segment>, top-level pages their own path. Derived paths get a suffix on collision, with a warning; explicit duplicates are errors. - chapter_
page_ πsegment - A chapter pageβs explicit path: its last segment alone, or the whole path under some
/chapter-N. - find_
links_ πto_ old_ paths - Links in
pageswhose target ends in/<course slug><old path>of a page inchanged.structurehas the paths after the change. The links are reported, not rewritten: most keep working through the redirects, but one whose old path another page now has opens that page. - is_
chapter_ πsegment - last_
segment π - normalize_
segment π rawas one path segment, in the form storage keeps (normalize_url_path_for_storage), so an agent can set any path a teacher can.- normalize_
top_ πlevel_ path - path_
changes π - Old and new paths of the pages of
docwhose path differs frombefore_paths. - title_
segment π - The path segment a page with
titlegets.