<commit_before>handlebars-iron
===============

[Handlebars](https://github.com/sunng87/handlebars-rust) middleware
for the [Iron web framework](http://ironframework.io).

[![Build
Status](https://travis-ci.org/sunng87/handlebars-iron.svg)](https://travis-ci.org/sunng87/handlebars-iron)

## Usage

Add HandlebarsEngine to your Iron middleware chain as an "after"
middleware.

```rust
  /// HandlebarsEngine will look up all files with "./examples/templates/**/*.hbs"
  chain.link_after(HandlebarsEngine::new("./examples/templates/", ".hbs"));
```

In your handler, set `Template` to response. As required by
Handlebars-rust, your data should impl `serialize::json::ToJson`.<commit_msg>(chore) update README for rust unstable API<commit_after>handlebars-iron
===============

[Handlebars](https://github.com/sunng87/handlebars-rust) middleware
for the [Iron web framework](http://ironframework.io).

[![Build
Status](https://travis-ci.org/sunng87/handlebars-iron.svg)](https://travis-ci.org/sunng87/handlebars-iron)

Currently handlebars-iron still uses some unstable APIs, which means this
project might break on Rust 1.0.0-beta. Please use Rust nightlies instead.

## Usage

Add HandlebarsEngine to your Iron middleware chain as an "after"
middleware.

```rust
  /// HandlebarsEngine will look up all files with "./examples/templates/**/*.hbs"
  chain.link_after(HandlebarsEngine::new("./examples/templates/", ".hbs"));
```

In your handler, set `Template` to response. As required by
Handlebars-rust, your data should impl `serialize::json::ToJson`.
{'fraction_non_alphanumeric': 0.16172680412371135, 'fraction_numerical': 0.009664948453608248, 'mean_word_length': 5.236947791164659, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3536514', 'n_tokens_mistral': 495, 'n_tokens_neox': 468, 'n_words': 124}