Skip to main content

find_links_to_old_paths

Function find_links_to_old_paths 

Source
pub(super) fn find_links_to_old_paths(
    pages: &[PageRef<'_>],
    course_slug: &str,
    changed: &[CreatedRedirect],
    structure: &CourseStructure,
) -> Vec<LinkToOldPath>
Expand description

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.