Dual-licensed under MIT or the UNLICENSE.
cargo install handlebars-magic
``` handlebars-magic 0.4.0 Generates documentation from handlebars templates
USAGE: handlebars-magic
FLAGS: -h, --help Prints help information -V, --version Prints version information
ARGS: The input folder with templates
```
fromSearches for the prefix and starts with it if found. Else returns the whole string.
{{ from "begin" "prefix begin text end" }}
renders to:
begin text end
renderProcesses an argument as handlebars's template.
{{ render "some handlebars template" }}
renders to:
some handlebars template
This does not look useful until we use it in conjuction with other helper such as read_to_str from handlebarsmischelpers:
{{ render ( read_to_str "templates/README.md" ) }}
codeblockAllows to insert markdown's fenced code block. Content would be trimmed.
{{ codeblock "bash" "echo test" }}
renders to:
```bash
echo test
```
execAllows to include output of command.
{{ exec "echo test" }}
renders to:
test
handlebars_misc_helpersAll helpers from handlebarsmischelpers.