assemble

Why use Assemble?

Most popular site generator for Grunt.js and Yeoman. Assemble is used to build hundreds of web projects, ranging in size from a single page to 14,000 pages (that we're aware of!). Let us know if you use Assemble.

Allows you to carve your HTML up into reusable fragments: partials, includes, sections, snippets... Whatever you prefer to call them, Assemble does that.

Optionally use layouts to wrap your pages with commonly used elements and content.

"Pages" can either be defined as HTML/templates, JSON or YAML, or directly inside the Gruntfile.

If set, this defines the layout file to use for the task or target. However, when specifying a layout, unlike Jekyll, Assemble requires a file extension since you are not limited to using a single file type.

layoutext

Type: String
Default: undefined

Specify the extension to use for layouts, enabling layouts in YAML front matter to be defined without an extension:

flatten

Type: Boolean
Default: false

Remove anything after (and including) the first . in the destination path, then append this value. In other words, when files are generated from different source folders this "flattens" them into the same destination directory. See [building the files object dynamically][files-object] for more information on files formats.

Contributing

Find a bug? Have a feature request? Please create an Issue.

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt, and build the documentation with grunt-readme.

Pull requests are also encouraged, and if you find this project useful please consider "starring" it to show your support! Thanks!

Assemble plugins

Here are some related projects you might be interested in from the Assemble core team.

assemble-contrib-lunr: Assemble plugin for creating a search engine within your static site using lunr.js.

assemble-contrib-markdown: Convert markdown files to HTML using marked.js. This plugin is an alternative to Assemble's markdown Handlebars helpers. Both are useful in different scenarios.

assemble-contrib-permalinks: Permalinks plugin for Assemble, the static site generator for Grunt.js and Yeoman. This plugin enables powerful and configurable URI replacement patterns, presets, uses Moment.js for parsing dates, and much more.

2013-08-01 v0.4.4 Adds "nested layouts" Adds option for pages in JSON/YAML collections to be defined as either objects or keys in an array.

2013-08-01 v0.4.3 Adds "options.pages" for passing in an array of pages in JSON or YAML format.

2013-06-20 v0.4.0 Adds "layoutdir" option for defining the directory to be used for layouts. If layoutdir is defined, then layouts may be defined using only the name of the layout.

2013-06-10 v0.3.81 Adds additional ways to load custom helpers. Now it's possible to use a glob pattern that points to a list of scripts with helpers to load. Adds examples and tests on how to use the new custom helper loading methods.

2013-06-01 v0.3.80 Fixing bug with null value in engine

2013-05-07 v0.3.77 Updated README with info about assemble methods

2013-04-28 v0.3.74 Updating the assemble library to use the assemble-utils repo and unnecessary code.

2013-04-21 v0.3.73 Fixing how the relative path helper worked and showing an example in the footer of the layout. This example is hidden, but can be seen by doing view source.