Skip to main content

assign_paths

Function assign_paths 

Source
pub(super) fn assign_paths(
    doc: &mut CourseStructure,
    requests: &PathRequests,
    before_paths: &HashMap<Uuid, String>,
    front_page: Option<Uuid>,
) -> Result<Vec<Warning>, EditError>
Expand description

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.