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");
}
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!)
some flavors that compliment blanket-rs
- JSX style
<Component />
syntax tools like render - markdown parsers, like pulldown-cmark or markdown-rs