72 releases (44 stable)
| 2.14.0 | Dec 12, 2025 |
|---|---|
| 2.13.0 | Nov 30, 2025 |
| 2.12.0 | Aug 24, 2025 |
| 2.11.0 | Jun 28, 2025 |
| 0.26.0 | Nov 11, 2022 |
#767 in Template engine
2,152 downloads per month
Used in 5 crates
(4 directly)
1MB
16K
SLoC
MiniJinja-Autoreload
MiniJinja-Autoreload is a utility crate for MiniJinja that adds an abstraction layer that provides auto reloading functionality of environments.
This simplifies fast development cycles without writing custom code.
use minijinja_autoreload::AutoReloader;
use minijinja::{path_loader, Environment};
let reloader = AutoReloader::new(|notifier| {
let mut env = Environment::new();
let template_path = "path/to/templates";
notifier.watch_path(template_path, true);
env.set_loader(path_loader(template_path));
Ok(env)
});
let env = reloader.acquire_env()?;
let tmpl = env.get_template("index.html")?;
For an example have a look at the autoreload example.
Sponsor
If you like the project and find it useful you can become a sponsor.
License and Links
- Documentation
- Issue Tracker
- License: Apache-2.0
Dependencies
~0.2–9.5MB
~44K SLoC