Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Static site generator for Grunt.js, Yeoman, and Node.js that builds sites, themes, components, documentation, blogs, and gh-pages.
Grunt Assemble is a static site generator that runs as a Grunt.js task, used by Zurb Foundation, Zurb Ink, H5BP, Topcoat, and hundreds of other projects to build HTML sites, themes, components, documentation, blogs, and gh-pages.
Grunt Assemble is a static site generator for Grunt.js and Node.js. It takes Handlebars templates, partials, layouts, and data files (JSON or YAML) as input, and generates static HTML files as output. The project is maintained by Jon Schlinkert and Brian Woodward, and its documentation lives at assemble.io. It requires Grunt ~0.4.1 and is installed via npm as grunt-assemble.
layoutdir option so layouts can be referenced by name.data/*.{json,yml} are supported.handlebars-helpers library are available by default; custom helpers can be loaded via the helpers option.engine option lets you switch, such as to Swig via assemble-swig.ext sets the destination file extension (default .html).sitemap.xml and RSS feeds.Add the grunt-assemble task to your Gruntfile, define an assemble target in grunt.initConfig() with options like partials, layout, data, and plugins, then run grunt assemble. The task reads source templates from the src property, applies the data and layouts, and writes rendered HTML to dest.
Yes, grunt-assemble is released under the MIT license, and the source code is available on GitHub. It is also installed via npm as a dev dependency, so there's no licensing fee.
By default it uses Handlebars. You can change it with the engine option — for example, assemble-swig supports Swig templates. Custom helpers and plugins are loaded through the helpers and plugins options.
Grunt Assemble requires Grunt ~0.4.1. You load the task in your Gruntfile with grunt.loadNpmTasks('grunt-assemble').
Use the layoutext option, then layouts in YAML front matter can be written as layout: default instead of layout: default.hbs. You can also set layoutdir so layouts are searched for by name.
Versions below 0.2.0 are deprecated and available on the 0.1.15-deprecated branch. Versions at and above 0.2.0 contain the code from the original assemble project up to version 0.4.42; see the migration notes for breaking changes when upgrading.
