Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
geraldb committed Mar 8, 2016
1 parent 2f46997 commit 533a5b6
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions metalsmith2.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Resulting in:

# Metalsmith - HTML Templates - Handlebars or Nunjucks?

Handlebars.js (web: [`handlebarsjs.com`](http://handlebarsjs.com)) - Minimalistic
**Handlebars** (web: [`handlebarsjs.com`](http://handlebarsjs.com)) - Minimalistic
Mustache-style `{{}}` "logic-less" templates
(e.g. no arguments for if conditionals or each loops possible,
no nested layouts, no content blocks, no inline macros, etc.)
Expand All @@ -143,7 +143,7 @@ no nested layouts, no content blocks, no inline macros, etc.)

# Metalsmith - HTML Templates - Handlebars or Nunjucks? (Cont.)

Nunjucks.js (web: [`mozilla.github.io/nunjucks`](https://mozilla.github.io/nunjucks)) - Rich & powerful
**Nunjucks** (web: [`mozilla.github.io/nunjucks`](https://mozilla.github.io/nunjucks)) - Rich & powerful
template language with block inheritance, autoescaping, macros, asynchronous control, and much more.
(Inspired by Jinja2 - a python template language inspired by Django's template language).

Expand Down Expand Up @@ -174,7 +174,6 @@ template language with block inheritance, autoescaping, macros, asynchronous con

Metalsmith uses Consolidate.js (github: [tj/consolidate.js](https://github.com/tj/consolidate.js)) -
a template engine consolidation library for Node.js.

More template engines include:

- Eco (Embedded CoffeeScript)
Expand Down Expand Up @@ -262,24 +261,24 @@ Links 'n' Bookmarks in JSON

~~~
<div>
<b>News 'n' Updates</b>
<b>Links 'n' Bookmarks</b>
<ul>
{%% for post in posts %}
<li><a href="{{{ post.urlxx }}">{{{ post.title }}</a></li>
{%% for link in links %}
<li><a href="{{{ link.url }}">{{{ link.title }}</a></li>
{%% endfor %}
</ul>
</div>
</div>
~~~

~~~
<div>
<b>Links 'n' Bookmarks</b>
<b>News 'n' Updates</b>
<ul>
{%% for link in links %}
<li><a href="{{{ link.url }}">{{{ link.title }}</a></li>
{%% for post in posts %}
<li><a href="{{{ post.urlxx }}">{{{ post.title }}</a></li>
{%% endfor %}
</ul>
</div>
</div>
~~~

(Source: [`staystatic/metalsmith-nunjucks/src/index.html`](https://github.com/staystatic/metalsmith-nunjucks/blob/master/src/index.html))
Expand Down

0 comments on commit 533a5b6

Please sign in to comment.