Expand description
Compile Forge templates to Askama (compile-time, build.rs path) or to a MiniJinja-compatible runtime form used by Spark.
Functions§
- compile_
dir - Walk
input_dirfor*.forge.htmland write Askama-compatible*.htmlfiles intooutput_dir, preserving the relative layout. - compile_
file - compile_
source - compile_
source_ runtime - Lower a Forge source string into MiniJinja-compatible syntax. Spark
directives (
@spark,@sparkScripts) emit function calls bound to MiniJinja’s global function table; other directives behave the same as the Askama path for now. - emit_
embedded_ registry - Walk
input_dirfor*.forge.htmland emit a Rust source file that registers each template’s raw source viainventory::submit!as aspark::template::EmbeddedTemplate. The user includes this from their crate root with: