Skip to main content

compute_relative_path

Function compute_relative_path 

Source
pub fn compute_relative_path(
    from_concept: &ConceptId,
    to_concept: &ConceptId,
) -> String
Expand description

Computes the relative markdown link path from from_concept to to_concept.

Example:

  • from: auth/tokens/jwt, to: auth/tokens/refresh -> "refresh.md"
  • from: auth/tokens/jwt, to: users/profile -> "../../users/profile.md"
  • from: overview, to: tables/users -> "tables/users.md"
  • from: tables/users, to: overview -> "../overview.md"