Shawn M Moore
and 2 contributors


App::Microsite::Assemble - Assemble a microsite with Handlebars


version 0.03


This module assembles templates/ into fully-baked pages.

Your project should contain a fragments/ subdirectory, filled with files that contain bits of copy. Any template can use {{fragment "copy-file-name"}} to inline the text from that file.

Subdirectories of templates/ can establish a hierarchy of wrappers. For example, you might have templates/basic/contact/ which is page contact wrapped by wrapper basic. The templates/basic/contact/ directory would have a content.handlebars (the body of the page) and config.json (for setting page title, etc).

Any directory in the hierarchy can have a wrapper.handlebars which wraps everything below it. So the top-level templates/ could have a very generic wrapper.handlebars that sets up <html> etc. Subdirectories under templates/ can provide more specific wrappers, in case where many pages share the same structure. So if your site has a bunch of pages divided into three different layouts, you might have three subdirectories under templates/ to manage your three wrappers.

Similarly, any directory can have a config.json which will combine in the usual way; files deeper in the hierarchy override settings from their upwards directories. Config variables will be provided in the template and its wrappers. This is intended for things like your generic templates/wrapper.handlebars setting the page title, using the {{title}} variable.

You can put partials in any directory under templates/ and they will cascade; deeper partials will shadow shallower partials.

Finally, the fragments/ directory structure should match templates/. The search path for fragment names works just like everything else.


  • Shawn M Moore <>

  • Michael Reddick <>


This software is copyright (c) 2013 by Infinity Interactive, Inc..

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.