implement creating pages in subdirectories with cli

This commit is contained in:
zyl 2024-11-08 21:58:53 -08:00
parent a485482fa7
commit 076b489c41
Signed by: zyl
SSH key fingerprint: SHA256:uxxbSXbdroP/OnKBGnEDk5q7EKB2razvstC/KmzdXXs

View file

@ -260,6 +260,7 @@ fn main() -> eyre::Result<()> {
..Default::default()
}),
};
std::fs::create_dir_all(page_path.parent().expect("should never fail"))?;
std::fs::write(&page_path, fm.format()?)?;
println!("Page created! Edit at {:?}.", page_path);