blanket-rs

Crates.ioblanket-rs
lib.rsblanket-rs
version2.0.0-alpha-rc4
sourcesrc
created_at2024-01-24 12:47:03.195487
updated_at2024-03-23 23:33:07.192465
descriptionStatic generator
homepage
repositoryhttps://github.com/oclyke/blanket-rs
max_upload_size
id1112125
size844,757
(oclyke)

documentation

README

blanket-rs

static generator

to get started try the example: cargo run --example basic

then go ahead and start using the library in your own project =D

cargo add blanket-rs

fn main() {
    fn run() -> Result<(), Box<dyn std::error::Error>> {
        let mut builder = blanket_rs::builder::Builder::new();
        builder.require(blanket_rs::resource::CopyFile::new("source/index.html", "dest/index.html"))?;
        builder.generate()?;
        Ok(())
    }
    run().expect("expected to exit successfully");
}

why blanket-rs

great question. there are a lot of options for static website generation in Rust - see alternatives - but for many use cases they are overkill. blanket is all about simplicity.

some simple pleasures

  • you are in control
  • you add blanket to your project, not the other way around

you should use blanket

  • to declaratively generate a static website

you should not use blanket

  • if you need to compile or bundle javascript (check out vite!)
  • when performance is as imporant as correctness (check out bazel!)

pairings

some flavors that compliment blanket-rs

Commit count: 32

cargo fmt