Compile templates with content to html
This plugin requires Grunt
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install chains-pages --save-dev
Run this task with the
grunt pages command.
pages:options:partials: 'include/*'template: 'layout/template.hogan'return title: 'Hello World!';engine: 'hogan'test:files:expand: truecwd: 'content/'src: '*'dest: 'out/'
This defines which tepmlate to use when precessing files.
This defines which partials to use in the
It accepts either comma separated globbing patterns or an array of globbing patterns.Paths matching patterns that begin with ! will be excluded from the returned array.Patterns are processed in order, so inclusion and exclusion order is significant. Refer grunt.file.expand
This option accecpts all template engine names that
This defines extra Context when render templates. It will add a
content property. So, in your template you can use
content to output the content specified in
If defined it as a Function, you must return an Object with all properties accessed in your template.