jekyll/jekyll — pull request #2419 by jens-na (2014-05-17 16:02:33+00:00)
Title: Front-matter defaults inside documents of a collection

This PR adds support for frontmatter-defaults inside collections.

Currently you can specify default values in pages, posts and drafts only. With this PR it is possible to pass a collection to the the `defaults/scope/type` key in `_config.yml`.

Example:

You have a collection with two documents:
```
_slides/
slide-1.html
slide-2.html
```

And a _config.yml with this content:
```yml
...
collections:
slides:
output: true

defaults:
-
scope:
path: ""
type: slides # <= here you can specify a collection now!
values:
layout: slide
test: Value
```
You can use `{{ page.test }}` inside `_slides/slide-1.html` which will result to `Value`.
I have also written a few tests, but I like to write a few more.

Open issues:
- [ ] Add a few more tests, especially to make sure the `defaults/scope/path` key works with this PR
- [ ] Create documentation
- [ ] Rebase

See also: #2405
/cc @parkr @benbalter