UNPKG

templates

Version:

System for creating and managing template collections, and rendering templates with any node.js template engine. Can be used as the basis for creating a static site generator or blog framework.

25 lines (19 loc) 525 B
'use strict'; var utils = require('../utils'); module.exports = function (app, collection, options) { var plural = options.plural; var single = options.inflection; /** * Create async helpers for each default template `type`. * * @param {String} `type` The type of template. * @param {String} `plural` Plural form of `type`. * @api private */ app.helper(plural, function () { return app.getViews(plural); }); app.helper('views', function (name) { return app.getViews(name); }); };