(s: &str)
| 245 | } |
| 246 | |
| 247 | fn slug(s: &str) -> String { |
| 248 | s.to_lowercase() |
| 249 | } |
| 250 | |
| 251 | fn require_str(fm: &Map<String, Value>, key: &str) -> Result<String> { |
| 252 | opt_str(fm, key).ok_or_else(|| CanonicalError::Lift(format!("frontmatter missing '{key}'"))) |