Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MakeNowJust/crustache
{{Mustache}} for Crystal :gem:
https://github.com/MakeNowJust/crustache
crystal mustache template
Last synced: 3 months ago
JSON representation
{{Mustache}} for Crystal :gem:
- Host: GitHub
- URL: https://github.com/MakeNowJust/crustache
- Owner: makenowjust
- License: mit
- Created: 2015-07-10T02:27:49.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-03-13T10:29:50.000Z (10 months ago)
- Last Synced: 2024-08-01T00:41:25.553Z (6 months ago)
- Topics: crystal, mustache, template
- Language: Crystal
- Homepage: https://mustache.github.io
- Size: 111 KB
- Stars: 83
- Watchers: 6
- Forks: 12
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-crystal - crustache - [{{Mustache}}](https://mustache.github.io) for Crystal (Template Engine)
- awesome-crystal - crustache - [{{Mustache}}](https://mustache.github.io) for Crystal (Template Engine)
- awesome-crystal - crustache - [{{Mustache}}](https://mustache.github.io) for Crystal (Template Engine)
README
# crustache
crustache is the implementation of __[mustache](https://mustache.github.io/)__ logic-less templates.
This library implemated [mustache's spec v1.1.2+λ](https://github.com/mustache/spec/tree/v1.1.2).
[![test](https://github.com/makenowjust/crustache/actions/workflows/test.yml/badge.svg)](https://github.com/makenowjust/crustache/actions/workflows/test.yml)
## Installation
Add this to your application's `shard.yml`:
```yaml
dependencies:
crustache:
github: MakeNowJust/crustache
```## Usage
```crystal
require "crustache"# Parse a mustache template
template = Crustache.parse "Hello {{Name}} World!"# Make a model
model = {"Name" => "Crustache"}# Render!
puts Crustache.render template, model
#=> Hello Crustache World!
```## Development
**NOTE:** Please run `git submodule update --init` before running spec.
This library's specs are put in `spec` directory.
They can run by `crystal spec` command.## Contributing
1. [Fork it](https://github.com/MakeNowJust/crustache/fork)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request## License
MIT
© TSUYUSATO "[MakeNowJust](https://quine.codes)" Kitsune <> 2015-2020## Contributors
- [@MakeNowJust](https://github.com/MakeNowJust) TSUYUSATO Kitsune - creator, maintainer