bookyard 0.1.0

Build and locally edit a bookshelf for multiple mdBook projects.
1
2
3
4
5
6
7
8
9
pub async fn run(host: String, port: u16, edit: bool) -> anyhow::Result<()> {
    let root = crate::commands::root_dir()?;
    let config = crate::commands::load_config()?;
    let output_dir = root.join(&config.workspace.output);
    if !output_dir.exists() {
        crate::render::shelf::write_shelf(&output_dir, &config)?;
    }
    crate::server::serve(root, output_dir, host, port, edit).await
}