All Projects → repeatedly → Mustache D

repeatedly / Mustache D

Mustache template engine for D

Programming Languages

d
599 projects

Build Status

Mustache for D

Mustache is a push-strategy (a.k.a logic-less) template engine.

Features

  • Variables

  • Sections

    • Lists

    • Non-False Values

    • Lambdas(half implementation)

    • Inverted

  • Comments

  • Partials

Usage

See example directory and DDoc comments.

Mustache.Option

  • ext(string)

File extenstion of Mustache template. Default is "mustache".

  • path(string)

root path to read Mustache template. Default is "."(current directory).

  • findPath(string delegate(string))

callback to dynamically find the path do a Mustache template. Default is none. Mutually exclusive with the path option.

  • level(CacheLevel)

Cache level for Mustache's in-memory cache. Default is "check". See DDoc.

  • handler(String delegate())

Callback delegate for unknown name. handler is called if Context can't find name. Image code is below.

if (followable context is nothing)
    return handler is null ? null : handler();

TODO

Working on CTFE.

Link

man page

Copyright

Copyright (c) 2011 Masahiro Nakagawa

Distributed under the Boost Software License, Version 1.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].