snapfire 0.4.0

High-productivity web templating library designed to accelerate development with an integrated, zero-configuration live-reload server. Provides first class integration with Tera and Actix Web.
Documentation
1
2
3
4
5
6
7
8
9
10
use actix_web::{web, Responder};
use snapfire::TeraWeb;
use tera::Context;

// Test handler that uses the snapfire render method
pub async fn test_handler(app_state: web::Data<TeraWeb>) -> impl Responder {
  let mut context = Context::new();
  context.insert("page_title", "Integration Test");
  app_state.render("index.html", context)
}