pub fn doc_dir(path: &str) -> &str
The directory of a repo path: everything up to and including the last / ("a/b/" for a/b/c.md, "" at the root). The reference’s path.replace(/[^/]*$/, "").
/
"a/b/"
a/b/c.md
""
path.replace(/[^/]*$/, "")