Mustache syntax and features in Ramhorns
masterRamhorns implements the Mustache template syntax with several key features:
- Variables: Use
{{variable}}to render common types like&str,String,bool, and numbers. - Unescaped Printing: Use
{{{triple-brace}}}or{{&ersand}}to print content without HTML escaping. - Sections: Use
{{#foo}} ... {{/foo}}to render sections (useful for iterating over lists or conditional rendering). - Inverse Sections: Use
{{^foo}} ... {{/foo}}to render content when a section is empty or false. - Partials: Use
{{>file.html}}to include partial templates. - Markdown Rendering: Fields marked with the
#[md]attribute support zero-copy CommonMark rendering.