Skip to content

pyrmont/musty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Musty

Test Status

Musty is an implementation of the Mustache templating language in Janet.

Rationale

Mustache templates are strings with special values that are expanded when rendered. Give Musty your template string, a context dictionary and an optional directory path for partials. You get back the expanded string. Too easy.

Musty passes Mustache's specs for variables, sections, inverted sections, comments, partials and custom delimiters. It does not support lambdas, dynamic names or inheritance.

Library

Installation

Add the dependency to your info.jdn file:

  :dependencies ["https://github.com/pyrmont/musty"]

Usage

Musty can be used like this:

(import musty)

(musty/render "Hello {{world}}!" {:world "everybody"} :dir ".")
# => "Hello everybody!"

Check out the API document for more information.

Bugs

Found a bug? I'd love to know about it. The best way is to report your bug in the Issues section on GitHub.

Licence

Musty is licensed under the MIT Licence. See LICENSE for more details.

About

An implementation of the Mustache templating language in Janet

Topics

Resources

License

Stars

Watchers

Forks

Contributors