hipsum
v0.2.0
Published
A filler text generator for Handlebars templates.
Downloads
17
Readme
Hipsum.js
A filler text helper for Handlebars templates.
Installation
Install Hipsum.js in your project folder using a terminal.
npm install hipsum --save
In your application you can then include and register the helper.
var handlebars = require('handlebars'),
require('hipsum')(handlebars);
In your Handlebars templates you can now use the helper called filler
.
{{filler}} // produces one paragraph of Lorem ipsum.
{{filler 47}} // produces 47 words of Lorem ipsum.
Advanced Setup
Alternatively you can pass the helper around and not let Hipsum.js register it. This is useful e.g. if you use Express3-Handlebars or when you want to specify the name of the helper yourself.
var handlebars = require('handlebars'),
hipsumHelper = require('hipsum')();
handlebars.registerHelper('filler', hipsumHelper);