use serde::Serialize;
use serde::Deserialize;
use gumdrop::Options;
#[derive(Debug, Serialize, Deserialize)]
pub struct RenderConfig {
pub site_name: String,
pub base_url: String,
pub author: String,
pub template: String,
pub template_index: String,
pub site_description: String,
pub site_language: String
}
impl ::std::default::Default for RenderConfig {
fn default() -> Self {
Self {
site_name: String::from("livejrnl-rs"),
base_url: String::from("localhost"),
author: String::from("me"),
template: String::from("/dev/null"),
template_index: String::from("index.html.template"),
site_description: String::from("This is a site rendered with livejrnl-rs."),
site_language: String::from("en")
}
}
}
#[derive(Debug, Options)]
pub struct LaunchArgs {
#[options(help = "print help message")]
pub help: bool,
#[options(help = "rendering configuration to use")]
pub config: String,
#[options(help = "directory to write generated files to", required)]
pub out_dir: String
}