segmentio/metalsmith-templates — pull request #21 by krawaller (2014-08-17 16:37:32+00:00)
Title: adding `master` template option and tests

This pull request implements a hack I found very useful, namely allowing a `master` option. It names a master template in the templates dir to run the files through AFTER an eventual specified or default template. Thus the `contents` variable in the master template will contain the result of the previous template (or the unprocessed file if there was no given template).

With this in place I could get rid of all "header" and "footer" partial invocations throughout my various Handlebars templates in my static site, which was really nice!

NB: I wasn't entire clear on the use case for the new `inPlace` option, so the current implementation only uses the `master` option if `inPlace` isn't set.