Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 165 lines (95 sloc) 7.426 kB
a81f56a @groue Restore README title
authored
1 GRMustache
2 ==========
3
4 GRMustache is a production-ready implementation of [Mustache](http://mustache.github.com/) templates for MacOS Cocoa and iOS.
5
3844b9d @groue v5.5.2
authored
6 **October 22th, 2012: GRMustache 5.5.2 is out.** [Release notes](GRMustache/blob/master/RELEASE_NOTES.md)
9286ccb @groue link to iPhone5 branch
authored
7
f6a5a44 @groue v5.2.0
authored
8 Don't miss a single release: follow [@GRMustache](http://twitter.com/GRMustache) on Twitter.
070c126 @groue dot variable extension
authored
9
66a61ab @groue README
authored
10 How To
11 ------
f52da9d @groue README+RELEASE_NOTES for GRMustacheNumberFormatterHelper and GRMustac…
authored
12
559f600 @groue CocoaPods support
authored
13 ### 1. Download and add to your Xcode project
acb8902 @groue wording
authored
14
cf09386 @groue More straightforward README
authored
15 $ git clone https://github.com/groue/GRMustache.git
f5fb58f @groue wording
authored
16
9797639 @groue v5.0.0
authored
17 - For MacOS development, add `include/GRMustache.h` and `lib/libGRMustache5-MacOS.a` to your project.
18 - For iOS development, add `include/GRMustache.h` and `lib/libGRMustache5-iOS.a` to your project.
498f196 @groue Attempt to clarify the targeted system versions
authored
19
c834a75 @groue v5.5
authored
20 Alternatively, you may use [CocoaPods](https://github.com/CocoaPods/CocoaPods): append `pod 'GRMustache', '~> 5.5'` to your Podfile.
b5c4640 @groue Expressiveness
authored
21
85cbb69 @groue more v5.1.0 release notes
authored
22 GRMustache targets MacOS down to 10.6 Snow Leopard, iOS down to version 4.3, and only depends on the Foundation framework.
23
911ad47 @groue Don't let armv6 down.
authored
24 **armv6 architecture**: The last GRMustache static library that embeds the armv6 slice is [GRMustache 5.0.1](https://github.com/groue/GRMustache/tree/v5.0.1). You now have to compile GRMustache yourself, or to use [CocoaPods](https://github.com/CocoaPods/CocoaPods).
559f600 @groue CocoaPods support
authored
25
d8d27c1 @groue README.md tweaks
authored
26 ### 2. Start rendering templates
1f63119 @groue wording
authored
27
c3116bd @groue GitHub Flavored Markdown
authored
28 ```objc
29 #import "GRMustache.h"
30
31 // Renders "Hello Arthur!"
b15c302 @groue More straightforward README
authored
32 NSString *rendering = [GRMustacheTemplate renderObject:[Person personWithName:@"Arthur"]
33 fromString:@"Hello {{name}}!"
34 error:NULL];
f52da9d @groue README+RELEASE_NOTES for GRMustacheNumberFormatterHelper and GRMustac…
authored
35
d8d27c1 @groue README.md tweaks
authored
36 // Renders a document from the `Profile.mustache` resource
66a61ab @groue README
authored
37 NSString *rendering = [GRMustacheTemplate renderObject:[Person personWithName:@"Arthur"]
d8d27c1 @groue README.md tweaks
authored
38 fromResource:@"Profile"
66a61ab @groue README
authored
39 bundle:nil
40 error:NULL];
41 ```
f52da9d @groue README+RELEASE_NOTES for GRMustacheNumberFormatterHelper and GRMustac…
authored
42
559f600 @groue CocoaPods support
authored
43
634ad41 @groue wording
authored
44 Documentation
45 -------------
46
b79cd9c @groue Move full documentation map back to README.md
authored
47 ### Mustache syntax
e8f9e1e @groue Reorganize documentation
authored
48
b79cd9c @groue Move full documentation map back to README.md
authored
49 - http://mustache.github.com/mustache.5.html
50
51 ### Guides
52
53 Introduction:
54
76781ff @groue Wording
authored
55 - [introduction.md](GRMustache/blob/master/Guides/introduction.md): a tour of the library features, and most common use cases.
b79cd9c @groue Move full documentation map back to README.md
authored
56
57 Loading templates:
58
59 - [templates.md](GRMustache/blob/master/Guides/templates.md): how to load templates from common sources.
60 - [partials.md](GRMustache/blob/master/Guides/partials.md): how to embed templates in other templates.
3941337 @groue Wording
authored
61 - [templates_repositories.md](GRMustache/blob/master/Guides/template_repositories.md): load templates from less common sources.
b79cd9c @groue Move full documentation map back to README.md
authored
62
63 Rendering templates:
64
65 - [runtime.md](GRMustache/blob/master/Guides/runtime.md): how to provide data to templates: an overview
66 - [runtime/context_stack.md](GRMustache/blob/master/Guides/runtime/context_stack.md): the key lookup in detail.
67 - [runtime/booleans.md](GRMustache/blob/master/Guides/runtime/booleans.md): boolean sections.
68 - [runtime/loops.md](GRMustache/blob/master/Guides/runtime/loops.md): enumerable sections.
69
70 Advanced Mustache:
71
ed26c85 @groue v5.3.0
authored
72 - [section_tag_helpers.md](GRMustache/blob/master/Guides/section_tag_helpers.md): how to process the template canvas before it is rendered with Mustache "lambda sections".
73 - [variable_tag_helpers.md](GRMustache/blob/master/Guides/variable_tag_helpers.md): how to perform rich rendering out of a simple `{{name}}` tag.
b79cd9c @groue Move full documentation map back to README.md
authored
74 - [filters.md](GRMustache/blob/master/Guides/filters.md): how to process data before it is rendered with "filters".
75 - [delegate.md](GRMustache/blob/master/Guides/delegate.md): how to hook into template rendering.
b5eacb4 @groue README.md links to Guides/proxies.md
authored
76 - [proxies.md](GRMustache/blob/master/Guides/proxies.md): how to extend the behavior of regular objects, and write robust and reusable filters and helpers.
b79cd9c @groue Move full documentation map back to README.md
authored
77
1a7b646 @groue v5.4.4
authored
78 ### Sample code
b79cd9c @groue Move full documentation map back to README.md
authored
79
34f2dbd @groue Fix layout sample code link from README.md
authored
80 - [layout template](GRMustache/tree/master/Guides/sample_code/layout): how to wrap a template in a "layout" template
b79cd9c @groue Move full documentation map back to README.md
authored
81 - [number_formatting.md](GRMustache/blob/master/Guides/sample_code/number_formatting.md): how to format numbers
82 - [indexes.md](GRMustache/blob/master/Guides/sample_code/indexes.md): how to render array indexes, render sections for the first or the last element, for odd or even elements, etc.
83 - [localization.md](GRMustache/blob/master/Guides/sample_code/localization.md): how to localize portions of your templates
84
85 ### Reference
86
87 - [Reference](http://groue.github.com/GRMustache/Reference/): the GRMustache reference, automatically generated from inline documentation, for fun and profit, by [appledoc](http://gentlebytes.com/appledoc/).
88
89 ### Internals
90
91 - [forking.md](GRMustache/blob/master/Guides/forking.md): the forking guide tells you everything about GRMustache organization.
9228835 @groue Common use cases right in the README
authored
92
93 FAQ
94 ---
95
caedcda @groue Wording consistency
authored
96 - **Q: How do I render array indexes?**
9228835 @groue Common use cases right in the README
authored
97
da9cdeb @groue indexes.md guide
authored
98 A: Check [Guides/sample_code/indexes.md](GRMustache/blob/master/Guides/sample_code/indexes.md)
9228835 @groue Common use cases right in the README
authored
99
d67b4cc @groue Guides/helpers.md refactoring + Insert Guides/localization.md in the …
authored
100 - **Q: How do I format numbers and dates?**
b483251 @groue Filters FAQ
authored
101
d67b4cc @groue Guides/helpers.md refactoring + Insert Guides/localization.md in the …
authored
102 A: Check [Guides/sample_code/number_formatting.md](GRMustache/blob/master/Guides/sample_code/number_formatting.md)
103
84779a5 @groue v5.1.0 documentation
authored
104 - **Q: How do I render partial templates whose name is only known at runtime?**
105
ed26c85 @groue v5.3.0
authored
106 A: Check [Guides/variable_tag_helpers.md](GRMustache/blob/master/Guides/variable_tag_helpers.md)
84779a5 @groue v5.1.0 documentation
authored
107
f8978e9 @groue Overridable partials documentation
authored
108 - **Q: Does GRMustache provide any layout or template inheritance facility?**
109
d16ca4c @groue Link "Does GRMustache provide any layout or template inheritance faci…
authored
110 A: Check [Guides/partials.md](GRMustache/blob/master/Guides/partials.md), and the [sample Xcode project](GRMustache/tree/master/Guides/sample_code/layout).
f8978e9 @groue Overridable partials documentation
authored
111
d67b4cc @groue Guides/helpers.md refactoring + Insert Guides/localization.md in the …
authored
112 - **Q: How do I localize templates?**
113
114 A: Check [Guides/sample_code/localization.md](GRMustache/blob/master/Guides/sample_code/localization.md)
b483251 @groue Filters FAQ
authored
115
9228835 @groue Common use cases right in the README
authored
116 - **Q: How do I render default values for missing keys?**
117
d8d27c1 @groue README.md tweaks
authored
118 A: Check [Guides/delegate.md](GRMustache/blob/master/Guides/delegate.md).
9228835 @groue Common use cases right in the README
authored
119
4973f8c @groue README
authored
120 - **Q: What is this NSUndefinedKeyException stuff?**
121
122 A: When GRMustache has to try several objects until it finds the one that provides a `{{key}}`, several NSUndefinedKeyException are raised and caught. Let us double guess you: it's likely that you wish Xcode would stop breaking on those exceptions. This use case is covered in [Guides/runtime/context_stack.md](GRMustache/blob/master/Guides/runtime/context_stack.md).
9228835 @groue Common use cases right in the README
authored
123
9f3dcaf @groue Answer to FAQ: "Why does GRMustache need JRSwizzle?"
authored
124 - **Q: Why does GRMustache need JRSwizzle?**
125
d8d27c1 @groue README.md tweaks
authored
126 A: GRMustache does not need it. However, *you* may happy having GRMustache [swizzle](http://www.mikeash.com/pyblog/friday-qa-2010-01-29-method-replacement-for-fun-and-profit.html) `valueForUndefinedKey:` in the NSObject and NSManagedObject classes when you invoke `[GRMustache preventNSUndefinedKeyExceptionAttack]`. The use case is described in [Guides/runtime/context_stack.md](GRMustache/blob/master/Guides/runtime/context_stack.md).
9f3dcaf @groue Answer to FAQ: "Why does GRMustache need JRSwizzle?"
authored
127
6c45529 @groue Advertising
authored
128 What other people say
129 ---------------------
130
131 [@JeffSchilling](https://twitter.com/jeffschilling/status/142374437776408577):
132
133 > I'm loving grmustache
134
f772a08 @groue Typo
authored
135 [@basilshkara](https://twitter.com/basilshkara/status/218569924296187904):
6c45529 @groue Advertising
authored
136
137 > Oh man GRMustache saved my ass once again. Awesome lib.
138
f772a08 @groue Typo
authored
139 [@guiheneuf](https://twitter.com/guiheneuf/status/249061029978460160):
6c45529 @groue Advertising
authored
140
141 > GRMustache filters extension saved us from great escaping PITAs. Thanks @groue.
142
f772a08 @groue Typo
authored
143 [@orj](https://twitter.com/orj/status/195310301820878848):
6c45529 @groue Advertising
authored
144
145 > Thank fucking christ for decent iOS developers who ship .lib files in their Github repos. #GRMustache
146
147
9228835 @groue Common use cases right in the README
authored
148
149 Contribution wish-list
150 ----------------------
151
152 I wish somebody would review my non-native English, and clean up the guides, if you ask.
f52da9d @groue README+RELEASE_NOTES for GRMustacheNumberFormatterHelper and GRMustac…
authored
153
f5fb58f @groue wording
authored
154
c0e699e @groue wip
authored
155 Forking
156 -------
157
d8957ab @groue renamed guides to Guides
authored
158 Please fork. You'll learn useful information in [Guides/forking.md](GRMustache/blob/master/Guides/forking.md).
c0e699e @groue wip
authored
159
f5fb58f @groue wording
authored
160
e4bd74e @groue License
authored
161 License
162 -------
163
c2029a5 @groue LICENSE file
authored
164 Released under the [MIT License](GRMustache/blob/master/LICENSE).
Something went wrong with that request. Please try again.