russel 0.0.2

A simple static site builder I built for myself.
Documentation
use crate::error::Result;
use std::path::Path;

use super::utils::create_directory_safe;

/// Creates the initial directory shape for a Russel site
pub fn create_project(name: &str) -> Result<()> {
    let root_path = Path::new(name);

    create_directory_safe(root_path)?;

    let content_path = root_path.join("content");
    create_directory_safe(&content_path)?;

    Ok(())
}

// Validates the shape of new Russel site directory. Used to check
// the directory was created successfully and is not in a broken state.
// pub fn validate_project_creation(name: &str) -> Result<()> {
//     let root_path = Path::new(name);
//
//     if !root_path.exists() {
//         return Err(RussError::new_project(format!("Root directory was not created{}")));
//     }
//
//     Ok(())
// }