kabam-plugin-hogan
Kabam plugin to add support for hogan-express template engine utilizing hogan.js.
Installing
- Read the documentation on syntax
- Install plugin from github or npm
- Include plugin as
kabam.usePlugin('kabam-plugin-hogan');
- Create directory of views with templates - see example for details
- When you issue render function on response object in route of ExpressJS application, the view is rendered by hogan
Example
var kabamKernel = ;var kabam = ; kabam; kabam; kabam; kabamstart;
Contents of view folder:
`views/`
`index/`
`partials/`
`_currentTime.html`
`index.html`
`layout.html`
Mustache syntax
http://mustache.github.io/mustache.5.html
Why use mustache?
- Simple syntax
- High speed
- Yandex and Twitter used it
- You can render html, rss, xml, docx and whatever want.
Test
# Install the dependencies
$ npm install
# Run the test runner
$ npm test
Configuring
This plugin has a way to include css and javascript files URL in layout file.
kabam kabamapplocalscss; kabamapplocalsjavascripts;;
Responsibility guidelines
Every kabam plugin and package has the responsible developer. His duties are
- Maintain the package - fix and find bugs from upgrading modules included or nodejs version changing
- React on bug reports
- Accept/deny pull request.
The Push
and npm publish
privilege is the right of the Responsible developer
, but the fork
- is for everybody.
Responsible developer for this package is Anatolij Ostroumov