Skip to main content

rewrite_homepage_links

Function rewrite_homepage_links 

Source
fn rewrite_homepage_links(
    text: &str,
    base_dir: &Path,
    root: &Path,
    src_to_url: &HashMap<(String, String), String>,
    repo: Option<&str>,
    commit: Option<&str>,
) -> String
Expand description

Rewrite inline [text](url) markdown links in the homepage:

  • .sol paths that resolve to a known page → vocs URL.
  • Any other relative path under root{repo}/blob/{commit}/....
  • Absolute URLs, anchors, and unresolved targets are left untouched.