0.9.2 • Published 12 years ago

hogan-engine v0.9.2

Weekly downloads
57
License
-
Repository
-
Last release
12 years ago

Hogan.js engine for Express 3.x

Installation

npm install hogan-engine

Setup

Where app is your express app instance.

// Add the engine
app.engine('html', require('hogan-engine'));

// Then just do the normal view setup
app.set('views', __dirname + '/views');
app.set('view engine', 'html');

That's it.

Usage

After installing the engine, you can use it as you would any other express templating engine.

res.render('index', { title: 'Hello World' });

And have the template views/index.html

{{> header.html}}

<h1>{{ titile }}</h1>

{{> footer.html}}

Notice we included a couple partials. You don't have to do anything more then have them in the views directory for them to be loaded and rendered. Easy.

0.9.2

12 years ago

0.9.1

12 years ago

0.9.0

12 years ago