Skip to main content

Module paths

Module paths 

Source
Expand description

Page URL paths: the ones a structure call derives at its end, and links to the old ones.

StructsΒ§

LinkToOldPath
A link in course content that points at a page’s old path.
PathRequests πŸ”’
The paths a call’s ops asked for, applied when the call ends.
PlannedPath πŸ”’
A page’s path before collisions are resolved.

FunctionsΒ§

assign_paths πŸ”’
Gives every page of doc its 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 pages whose target ends in /<course slug><old path> of a page in changed. structure has 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 πŸ”’
raw as 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 doc whose path differs from before_paths.
title_segment πŸ”’
The path segment a page with title gets.