Skip to content

Latest commit

 

History

History
21 lines (18 loc) · 1.2 KB

README.md

File metadata and controls

21 lines (18 loc) · 1.2 KB

MiniJinja Examples

This directory contains a lot of different examples that use the MiniJinja engine. Each example is in one directory from where you can run them with the cargo run command. Alternatively you can do cargo run -p example-name.

List of Examples

  • debug: contains an example showing the built-in debug() function.
  • dynamic: demonstrates how to use dynamic objects in templates.
  • error: shows the built-in error reporting support.
  • expr: demonstrates the expression evaluation support.
  • generate-yaml: renders YAML files from Jinja templates.
  • hello: minimal Hello World example.
  • inheritance: demonstrates how to use template inheritance.
  • loader: shows how to load templates dynamically at runtime.
  • minimal: a Hello World example without default features.
  • recursive-for: demonstrates the recursive for loop.
  • render-macro: minimal Hello World example using the render! macro.
  • render-template: CLI app that renders templates from string.
  • source: Demonstrates how to load templates from disk with the source feature.