mustache: A mustache template parser library.

[ bsd3, development, library, program ] [ Propose Tags ]

Allows parsing and rendering template files with mustache markup. See the mustache language reference. Implements the mustache spec version 1.1.3 This library requires GHC >= 7.10 because it uses the new overlapping instances to provide efficient and versatile conversion of custom data types into mustache Values.


[Skip to Readme]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.2.0.0, 0.3.0.0, 0.3.0.1, 0.3.1.0, 0.4.0.0, 0.4.0.1, 0.5.0.0, 0.5.1.0, 1.0, 1.0.1, 1.0.2, 2.0, 2.0.1, 2.1, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.2, 2.2.1, 2.2.2, 2.2.3, 2.3.0, 2.3.1, 2.3.2, 2.4.0, 2.4.1, 2.4.2 (info)
Dependencies aeson (<1.6), base (>=4.7 && <5), base-unicode-symbols, bytestring, cmdargs, containers, conversion (>=1.2), conversion-text, directory, either, filepath, ja-base-extra (>=0.2.1), mtl (>=2.2 && <2.3), mustache, parsec (>=3.1 && <3.2), scientific, tagsoup, text (>=1.2 && <1.3), unordered-containers, vector, yaml [details]
License BSD-3-Clause
Author Justus Adam
Maintainer dev@justus.science
Revised Revision 1 made by sjakobi at 2021-10-11T13:58:42Z
Category Development
Home page https://github.com/JustusAdam/mustache
Bug tracker https://github.com/JustusAdam/mustache/issues
Source repo head: git clone git://github.com/JustusAdam/mustache.git
this: git clone git://github.com/JustusAdam/mustache.git -b master(tag v0.3.1.0rc-3)
Uploaded by justus at 2015-10-20T15:45:36Z
Distributions Arch:2.4.2, Debian:2.3.1, Fedora:2.4.2, LTSHaskell:2.4.2, NixOS:2.4.2, Stackage:2.4.2
Reverse Dependencies 10 direct, 4 indirect [details]
Executables haskell-mustache
Downloads 30017 total (176 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2016-01-23 [all 3 reports]

Readme for mustache-0.3.1.0

[back to package description]

mustache Travis Status Hackage Join the chat at https://gitter.im/JustusAdam/mustache

Haskell implementation of mustache templates.

Implements the official specs version 1.1.3

Motivation

The old Haskell implementation of mustache templates hastache seemed pretty abandoned to me. This implementation aims to be much easier to use and (fingers crossed) better maintained.

Since it is so easy to use and requires but a few files of code, I've also written a small executable that compiles and renders mustache templates with data input from json or yaml files.

Usage

Library

Please refer to the documentation on hackage.

Executable haskell-mustache

$ haskell-mustache --help
Simple mustache template substitution

arguments [OPTIONS] TEMPLATE [DATA-FILES]

Common flags:
  -t --templatedirs[=DIRECTORY]  The directory in which to search for the
                                 templates
  -? --help                      Display help message
  -V --version                   Print version information

Current implementation substitutes the TEMPLATE once with each DATA-FILE

Roadmap

  • String parser for mustache templates
  • Template substitution
  • Standalone executable
  • Support for 'set delimiter'
  • More efficiency using Text rather than String
  • More efficient Text parsing
  • Test coverage provided via the official specs
  • Haddock documentation
  • More instances for ToMustache typeclass