plusjade / jekyll-bootstrap

The quickest way to start and publish your Jekyll powered blog. 100% compatible with GitHub pages.
jekyllbootstrap.com
MIT License
3.35k stars 1.71k forks source link

Upgrade to jekyll v3.1 #311

Closed parkr closed 8 years ago

parkr commented 8 years ago

Hey, @plusjade & co!

This PR fixes #295 and #290, originally reported to the Jekyll team as https://github.com/jekyll/jekyll/issues/4450.

In Jekyll v3.0, all collection documents (and posts, which became collection documents in the "posts" collection) migrated to using {{ layout }} for any metadata defined in a layout. In v3.1, after spotting that we forgot pages (d'oh!), we migrated to using {{ layout }} for any metadata defined in a layout for pages as well. This latter migration seems to have broken Jekyll Bootstrap.

This PR migrates to using {{ layout.theme.name }} if it exists, and falls back to {{ page.theme.name }} if one exists. Does this seem like an acceptable fix? Thanks!