Hogan.js for Express with support for Template Partials.
CoffeeScript JavaScript Makefile Shell
Switch branches/tags
Nothing to show
Latest commit 5029ccc Jun 16, 2016 @quangv committed on GitHub Update Readme.md
unmaintained message.
Failed to load latest commit information.
cakes Partials on sub-view folders working. #2 Feb 7, 2012
example Examples & Usage added. Feb 5, 2012
spec Exports parsePartials Feb 15, 2012
views .hulk moved to views folder Feb 7, 2012
LICENSE MIT License added to project. Mar 3, 2012
Makefile --globals log added to Makefile test utils Feb 5, 2012
Readme.md Update Readme.md Jun 16, 2016
cut cakes/express_engine fixed Feb 7, 2012
hulk.coffee change to using fat-arrow for __express method Jul 6, 2012
index.js index.js, loads hulk.coffee Feb 4, 2012
package.json Update package.json to be tied to coffee version Jan 29, 2014


Project is no longer being maintained.


Connect Hogan.js with Express, with support for Partials.

Hi {{name}}

{{> salute}}

Why is Hogan.js Awesome?

Logic-less templates, keeping control separate from views. Views separated from content.

Doesn't have many bells and whistles. HTML Structure, and views are suppose to be simple.

Mustache is awesome. Has many implementations. It's clear what's a {{variable}} and what is not.

Why Hulk-Hogan?

Becaues he's awesome. But also because there wasn't a solution I could find that let's you easily use Mustaches' partials natively with Express.

Partials Example


  {{> header}}
  My body.
  {{> footer}}


<h1>Hey There</h1>


<footer>See ya</footer>


  <h1>Hey There</h1>
  My body.
  <footer>See ya</footer>

Sub-Partials supported

You can link partials from within other partials.





Usage Example


Hello {{what}}!



  express = require 'express'
  hulk = require 'hulk-hogan'

  app = express.createServer()

  app.set 'views', __dirname+'/views'  # Directory of your views
  app.set 'view options', layout:false
  app.set 'view engine', 'hulk'  # use the .hulk file extensions for your views
  app.register '.hulk', hulk  # register to render .hulk with Hulk-Hogan

  app.get '/', (req,res)->
    res.render 'index', {what:'World'}

  app.listen 3000

coffee app.coffee http://localhost:3000 would produce:

Hello World!



 var app, express, hulk;

 express = require('express');
 hulk = require('hulk-hogan');

 app = express.createServer();

 app.set('views', __dirname + '/views');
 app.set('view options', {layout: false});
 app.set('view engine', 'hulk');
 app.register('.hulk', hulk);

 app.get('/', function(req, res) {
   res.render('index', {
     what: 'World'


node app.js http://localhost:3000 would produce:

Hello World!

Automated Tests

Hulk-Hogan uses mocha & mocha-cakes for testing.

make buffet should run all tests.


Hulk-Hogan inspired by HBS

should checkout express-hogan.js

and Micah Smith's hogan-express.js blog post for reference.

Special Thanks to the Hogan.js Twitter Team, as well as Hulk-Hogan's grand-dad, (or is it more like Great Uncle?) Mustache.

Also Thanks to TJ for the excellent Express and Express-Resource.