Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mustache

Docs - Read Donna - mustache Test status

Mustache template rendering for Donna, backed by the C mustach library.

Simple values:

import mustache

pub fn greeting() -> String:
  mustache.render("Hello {{name}}", [#("name", "Donna")])

Structured values and list sections:

mustache.render_view_with_partials(
  "{{#posts}}{{> post_card}}{{/posts}}",
  [
    mustache.list("posts", [
      [mustache.text("title", "Hello"), mustache.text("url", "/hello/")],
      [mustache.text("title", "Leaf"), mustache.text("url", "/leaf/")]
    ])
  ],
  [#("post_card", "<a href=\"{{url}}\">{{title}}</a>\n")]
)

Run checks:

donna check
donna test

About

🥸 Bindings for mustache template language

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages