Include Handlebars Templates for Rocket Framework

This is a crate which provides macros handlebars_resources_initialize! and handlebars_response! to statically include HBS (Handlebars) files from your Rust project and make them be the HTTP response sources quickly.

Example

```rust

![feature(plugin)]

![plugin(rocket_codegen)]

[macrouse] extern crate lazystatic;

[macrouse] extern crate rocketinclude_handlebars;

extern crate rocketetagifnonematch;

extern crate rocket; extern crate handlebars;

handlebarsresourcesinitialize!( "index", "included-handlebars/index.hbs", "index-2", "included-handlebars/index2.hbs" );

use std::collections::HashMap;

use rocket::local::Client; use rocket::http::Status;

use rocketincludehandlebars::HandlebarsResponse; use rocketetagifnonematch::EtagIfNoneMatch;

[get("/")]

fn index() -> HandlebarsResponse { let mut map = HashMap::new();

map.insert("title", "Title");
map.insert("body", "Hello, world!");

handlebars_response!("index", &map)

}

[get("/2")]

fn index_2() -> HandlebarsResponse { let mut map = HashMap::new();

map.insert("title", "Title");
map.insert("body", "Hello, world!");

handlebars_response!("index-2", &map)

} ```

Refer to tests/index.rs to see the example completely.

License

MIT