SparkartGroupInc/jungle-solidus — pull request #1 by joanniclaborde (2014-12-01 16:31:11+00:00)
Title: Layout template and preprocessor

Template and preprocessor for standard jungle layout.

I'm not sure about all this... The layout has to be included with a relative path in the site:
```
{{!
{
"title": "Index",
"name": "index",
"layout": "../node_modules/jungle-solidus/templates/layout",
"preprocessor": "index.js"
}
}}
...
```

The site also needs to have a header and footer views, even if they're empty: `views/header.hbs`, `views/footer.hbs`.

The layout preprocessor needs to be called manually from the site's preprocessor:
```javascript
var site = require('jungle-solidus/preprocessors/site');

module.exports = site;
```

And the site's config needs to be defined in the site's root folder (`site.yml`):
```yaml
domain:
version_asset_host:
asset_host:
facebook_app_id:
...
```

I also made [changes to solidus](https://github.com/solidusjs/solidus/commit/1a22051a3adbbfbc0ab82dbe2f611236307d3746), so any template defined here can be overridden on a per-site basis. For example, `jungle-solidus/templates/layout.hbs` renders this: `{{> jungle-solidus/templates/metadata}}`. `metadata.hbs` can be overridden on the site by creating a new file: `views/jungle-solidus/templates/metadata.hbs`.