Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Flexible and production-ready Mustache templates for MacOS Cocoa and iOS

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
Articles
Guides
Reference/html
include
lib
src
.gitignore
.gitmodules
AppledocSettings.plist
LICENSE
Makefile
README.md
RELEASE_NOTES.md
TODO.txt

README.md

GRMustache

GRMustache is a production-ready implementation of Mustache templates for MacOS Cocoa and iOS.

August 6th, 2012: GRMustache 4.3.2 is out. Release notes

Breaking news on Twitter: http://twitter.com/GRMustache

How To

1. Download and add to your Xcode project

$ git clone https://github.com/groue/GRMustache.git
  • For MacOS development, add include/GRMustache.h and lib/libGRMustache4-MacOS.a to your project.
  • For iOS development, add include/GRMustache.h and lib/libGRMustache4-iOS.a to your project.

Alternatively, you may use CocoaPods: append dependency 'GRMustache' to your Podfile.

GRMustache targets MacOS down to 10.6 Snow Leopard, iOS down to version 3, and only depends on the Foundation framework.

2. Import "GRMustache.h" and start rendering templates

#import "GRMustache.h"

// Renders "Hello Arthur!"
NSString *rendering = [GRMustacheTemplate renderObject:[Person personWithName:@"Arthur"]
                                            fromString:@"Hello {{name}}!"
                                                 error:NULL];

// Renders from a resource
NSString *rendering = [GRMustacheTemplate renderObject:[Person personWithName:@"Arthur"]
                                          fromResource:@"Profile"  // loads `Profile.mustache`
                                                bundle:nil
                                                 error:NULL];

Documentation

Documentation starts here: Guides/introduction.md.

FAQ

Contribution wish-list

I wish somebody would review my non-native English, and clean up the guides, if you ask.

Forking

Please fork. You'll learn useful information in Guides/forking.md.

License

Released under the MIT License.

Something went wrong with that request. Please try again.