Remove the AddPost command.

I will be putting this back in later but having the skeleton sitting there unused has no value at this time.
This commit is contained in:
Tom Alexander
2023-10-20 19:13:22 -04:00
parent 273734c9ff
commit 051e86e65a
5 changed files with 17 additions and 15 deletions

View File

@@ -0,0 +1,3 @@
mod runner;
pub(crate) use runner::build_site;

View File

@@ -0,0 +1,7 @@
use crate::cli::parameters::BuildArgs;
use crate::config::Config;
pub(crate) async fn build_site(args: BuildArgs) -> Result<(), Box<dyn std::error::Error>> {
let _config = Config::load_from_file(args.config).await?;
Ok(())
}

View File

@@ -1,7 +1,7 @@
use crate::cli::parameters::InitArgs;
use crate::config::Config;
pub(crate) async fn init_writer_folder(args: &InitArgs) -> Result<(), Box<dyn std::error::Error>> {
pub(crate) async fn init_writer_folder(args: InitArgs) -> Result<(), Box<dyn std::error::Error>> {
if args.path.exists() && !args.path.is_dir() {
return Err("The supplied path exists but is not a directory. Aborting.".into());
}
@@ -16,7 +16,7 @@ pub(crate) async fn init_writer_folder(args: &InitArgs) -> Result<(), Box<dyn st
return Err("The directory is not empty. Aborting.".into());
}
let new_config = Config::new(&args.path)?;
let new_config = Config::new(args.path)?;
new_config.write_to_disk().await?;
Ok(())
}