mirror of
https://github.com/zyllian/webdog.git
synced 2025-05-10 02:26:42 -07:00
implement creating pages in subdirectories with cli
This commit is contained in:
parent
a485482fa7
commit
076b489c41
1 changed files with 1 additions and 0 deletions
|
@ -260,6 +260,7 @@ fn main() -> eyre::Result<()> {
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
std::fs::create_dir_all(page_path.parent().expect("should never fail"))?;
|
||||||
std::fs::write(&page_path, fm.format()?)?;
|
std::fs::write(&page_path, fm.format()?)?;
|
||||||
|
|
||||||
println!("Page created! Edit at {:?}.", page_path);
|
println!("Page created! Edit at {:?}.", page_path);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue