fix building the site on windows

This commit is contained in:
zyl 2024-06-14 13:25:23 -07:00
parent ecf408d796
commit e770a9bd8d
No known key found for this signature in database
GPG key ID: FDAEE0976A45AAC3
2 changed files with 9 additions and 8 deletions

View file

@ -27,9 +27,12 @@ fn with_build_path(
}
/// Helper to get the "name" of a path.
fn get_name(path: &Path) -> (PathBuf, String) {
pub fn get_name(path: &Path) -> (PathBuf, String) {
let name = path.with_extension("");
let name_str = name.display().to_string();
let name_str = name
.display()
.to_string()
.replace(std::path::MAIN_SEPARATOR, "/");
(name, name_str)
}