mojombo/jekyll — pull request #986 by benbalter (2013-04-18 14:42:21+00:00)
Title: Move top, header, and footer includes into default layout.

This is a design pattern / best practices decision and would love everyone's thoughts.

Following up on #980, in terms of making the documentation site an example of the best way to build a Jekyll site, I wanted to start a discussion on separate header and footer files as includes, rather than having a single, unified template.

Middleman, another Ruby static site generator, adopts [this philosophy](http://middlemanapp.com/templates/) towards templates:

> Layouts allow the common HTML surrounding individual pages to be shared across all your templates. Developers coming from PHP will be used to the concept of "header" and "footer" includes which they reference at the top and bottom of every page. The Ruby world, and Middleman, take an inverse approach. The "layout" includes both the header and footer and then wraps the individual page content.

I'm a recovering WordPress developer, so `header.php` and `footer.php` are an awesome security blanket, but my understanding is the Ruby world (e.g., Rails), prefers a single file with a `yield` (or `{{ content }}`) in our case, a much more elegant approach that's just flat out impossible with the way PHP fires.

Also, for users diving in to Jekyll, it's a lot easier to explain a `_posts` folder and a `_layouts` folder (presentation, content), without having to throw partials in the mix.

Any strong opinions either way which is the "recommended" way to build a Jekyll site (and thus shape the way community does things?)