5 releases (2 stable)

2.0.0-alpha-rc4 Mar 23, 2024
1.0.1 Jan 28, 2024
1.0.0 Jan 26, 2024
0.1.2 Jan 24, 2024
0.1.1 Jan 24, 2024

#885 in Web programming

Download history 9/week @ 2024-01-24 3/week @ 2024-02-14 5/week @ 2024-02-21 2/week @ 2024-03-06 13/week @ 2024-03-13 169/week @ 2024-03-20 24/week @ 2024-03-27 25/week @ 2024-04-03

222 downloads per month

MIT license

1MB
384 lines

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

Dependencies

~2–11MB
~98K SLoC