Skip to main content

resolve_reference

Function resolve_reference 

Source
pub fn resolve_reference(
    reference: &str,
    graph: &ContentGraph,
    from_path: &str,
) -> ResolvedRef
Expand description

Resolve a reference string against the content graph.

This is a thin wrapper over ContentGraph::resolve_path that returns a typed ResolvedRef instead of Option<String>.

ยงArguments

  • reference โ€” the link target (e.g. "hello", "posts/hello.md")
  • graph โ€” the content graph to search
  • from_path โ€” the file containing the link (for disambiguation)