Skip to main content

inject_missing_keys_with_values

Function inject_missing_keys_with_values 

Source
pub fn inject_missing_keys_with_values(
    body: &str,
    keys: &[String],
    derived: &[(String, String)],
) -> String
Expand description

As inject_missing_keys, but derived supplies real values for the keys it names instead of the empty-string placeholder.

Author front matter wins: a key already present in the block is left exactly as written, so a theme can override any derived value — a locale tree served from a different origin, say — without fighting the default.