mint-template-engine 1.2.0-rc.2

Mint template engine
Documentation
  • Coverage
  • 0%
    0 out of 10 items documented0 out of 7 items with examples
  • Size
  • Source code size: 11.22 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.48 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • ashtneoi/mint
    0 0 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ashtneoi

how to use mint

invoking mint

mint TMPLPATH [NAME=VAL...]

Variable names can't start with !, and they can't contain }}, =, or newlines. Variable values can contain anything at all.

template files

A template file is made up of tags and arbitrary text. A tag looks like {{name}} and is replaced with the value of the variable name. {{! becomes a literal {{. Currently, template files and variable definitions must use UTF-8.

example

template.txt:

{{!foo}} renders to {{foo}}, and {{!! renders to {{!.
It doesn't matter if bar is defined, because we don't use it.

$ mint template.txt foo=cat bar=sock

Output:

{{foo}} renders to cat, and {{! renders to {{.
It doesn't matter if bar is defined, because we don't use it.

the name

"Mint" stands for "MINimal Template engine". I'm not good at naming things.