neiam
/fieri-forever
the flavortown lunch engine
public · Issues · Pulls · Labels · Forks · Compare · Actions success · Badges · Packages
⭐
Log in to mark this repository.
Correct the template-reload comment: embedded templates need a rebuild
0c53c7d · Gabriel Morell · 2026-10-28 20:51
Files changed
modified
src/lib.rs
+4
−3
@@ -31,9 +31,10 @@ pub struct AppState {
| 31 | 31 | pub live: live::Live, |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | −/// Build the minijinja environment: embedded templates (baked in by build.rs) | |
| 35 | −/// plus, in debug builds, a path loader so edits under `templates/` show up | |
| 36 | −/// on the next request without a rebuild. `app_name` is exposed as a global | |
| 34 | +/// Build the minijinja environment: templates embedded by build.rs, plus (in | |
| 35 | +/// debug builds) a path loader for any template not embedded. Embedded | |
| 36 | +/// templates win and the environment caches what it loads, so editing a | |
| 37 | +/// template needs a `cargo build` and restart, debug or not. `app_name` is exposed as a global | |
| 37 | 38 | /// so templates can render the brand without every handler passing it. |
| 38 | 39 | pub fn build_environment() -> Environment<'static> { |
| 39 | 40 | let mut env = Environment::new(); |
Parents: 3d2ee7c